Skip to:
Content

BuddyPress.org

Changeset 3702


Ignore:
Timestamp:
01/11/2011 11:07:03 PM (14 years ago)
Author:
djpaul
Message:

Make sure avatar cropping coords are set. Fixes #2522

File:
1 edited

Legend:

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

    r3358 r3702  
    8989    if ( (int) constant( 'BP_AVATAR_FULL_HEIGHT' ) && ( (int) constant( 'BP_AVATAR_FULL_WIDTH' ) != (int) constant( 'BP_AVATAR_FULL_HEIGHT' ) ) )
    9090        $aspect_ratio = (int) constant( 'BP_AVATAR_FULL_WIDTH' ) / (int) constant( 'BP_AVATAR_FULL_HEIGHT' );
     91
     92    $width  = $image[0] / 2;
     93    $height = $image[1] / 2;
    9194?>
    9295
     
    98101                onSelect: updateCoords,
    99102                aspectRatio: <?php echo $aspect_ratio ?>,
    100                 setSelect: [ 50, 50, <?php echo $image[0] / 2 ?>, <?php echo $image[1] / 2 ?> ]
     103                setSelect: [ 50, 50, <?php echo $width ?>, <?php echo $height ?> ]
    101104            });
     105            updateCoords({x: 50, y: 50, w: <?php echo $width ?>, h: <?php echo $height ?>});
    102106        });
    103107
Note: See TracChangeset for help on using the changeset viewer.