Skip to:
Content

BuddyPress.org

Changeset 7571


Ignore:
Timestamp:
11/15/2013 08:16:02 PM (6 years ago)
Author:
boonebgorges
Message:

Round calculated image sizes before concatenating cropper JS

Rounding to an integer ensures that we don't have problems with decimal-point
localization, which can produce JS parse errors.

Fixes #5245

Props olivM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cssjs.php

    r7446 r7571  
    7070
    7171    // Default cropper coordinates
    72     $crop_left   = $image[0] / 4;
    73     $crop_top    = $image[1] / 4;
     72    $crop_left   = round( $image[0] / 4 );
     73    $crop_top    = round( $image[1] / 4 );
    7474    $crop_right  = $image[0] - $crop_left;
    7575    $crop_bottom = $image[1] - $crop_top; ?>
Note: See TracChangeset for help on using the changeset viewer.