Opened 10 years ago
Closed 10 years ago
#6282 closed defect (bug) (fixed)
Wrong cropping of avatar, if you don't change the selection window.
Reported by: | WeddyWood | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 1.5 |
Component: | Extended Profile | Keywords: | |
Cc: |
Description
The problem occurs if you have uploaded a photo to crop, then did not change the position and size of window to be circumcised, and then clicked on the save button. In this case, cropped avatar will be shifted relative to the center, due to the fact that originally installed the wrong coordinate values of the window of circumcision.
In file "bp-core-cssjs.php" on lile 166 is wrong calculation of init coordinates (width & height):
updateCoords({x: <?php echo (int) $crop_left; ?>, y: <?php echo (int) $crop_top; ?>, w: <?php echo (int) $crop_right; ?>, h: <?php echo (int) $crop_bottom; ?>});
To solve the problem, you just need to delete this line. Javascript (when the page is initialized itself) will set the correct initial values of the coordinates of the window for circumcision.
Introduced in [3702]. See #2522.
I've reproduced the issue and it looks like your fix is correct. Thanks for the report!