[buddypress-trac] [BuddyPress Trac] #6560: Avatar Cropper JS Width and Height reversed
buddypress-trac
noreply at wordpress.org
Mon Jul 20 22:18:21 UTC 2015
#6560: Avatar Cropper JS Width and Height reversed
------------------------------+-----------------------------
Reporter: t3hpwninat0r | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: Awaiting Review
Component: Component - Core | Version: 2.3.2
Severity: major | Keywords: needs-patch
------------------------------+-----------------------------
When using a non-square width and height in my theme's functions.php like
so:
{{{
if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) )
define( 'BP_AVATAR_THUMB_WIDTH', 40 );
if ( !defined( 'BP_AVATAR_THUMB_HEIGHT' ) )
define( 'BP_AVATAR_THUMB_HEIGHT', 60 );
if ( !defined( 'BP_AVATAR_FULL_WIDTH' ) )
define( 'BP_AVATAR_FULL_WIDTH', 120 );
if ( !defined( 'BP_AVATAR_FULL_HEIGHT' ) )
define( 'BP_AVATAR_FULL_HEIGHT', 180 );
}}}
The crop selection area is landscape when it should be portrait.
The preview, in portrait, shows the selection stretched to fit and the
file is still stretched when saved.
bp-core/js/avatar.js line 530 reads:
{{{
selection = {}, crop_top, crop_bottom, crop_left, crop_right, nh, nw;
}}}
it should be:
{{{
selection = {}, crop_top, crop_bottom, crop_left, crop_right, nw, nh;
}}}
avatar.min.js should be regenerated after this change. This change is
tested and working on current stable releases in my development server.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6560>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list