Opened 9 years ago
Closed 9 years ago
#6560 closed defect (bug)
Avatar Cropper JS Width and Height reversed
Reported by: | t3hpwninat0r | Owned by: | |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | major | Version: | 2.3.2 |
Component: | Core | Keywords: | needs-patch |
Cc: |
Description
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.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
image is cropping landscape when it should be portrait