aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms/avatar/crop.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-10-01 20:28:07 -0400
committerCash Costello <cash.costello@gmail.com>2011-10-01 20:28:07 -0400
commit00433c37e49e1ca706809a1a5f1c515cd784fc22 (patch)
tree33b06e37106e85957079974fbe04d797b81f4c4e /views/default/forms/avatar/crop.php
parenta186ad16e258c6335e1757a20845c64056b87f15 (diff)
downloadelgg-00433c37e49e1ca706809a1a5f1c515cd784fc22.tar.gz
elgg-00433c37e49e1ca706809a1a5f1c515cd784fc22.tar.bz2
Fixes #3888 correcting initialization of avatar cropping library
Diffstat (limited to 'views/default/forms/avatar/crop.php')
-rw-r--r--views/default/forms/avatar/crop.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php
index b97db939c..1f39ff73c 100644
--- a/views/default/forms/avatar/crop.php
+++ b/views/default/forms/avatar/crop.php
@@ -62,9 +62,12 @@ echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create')));
$('<div id="user-avatar-preview"><img src="<?php echo $master_image; ?>" /></div>').insertAfter($('#user-avatar'));
$('<div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div>').insertBefore($('#user-avatar-preview'));
- // this produces the coordinates
- $('#user-avatar').imgAreaSelect({ selectionOpacity: 0, onSelectEnd: selectChange });
- // show the preview
- $('#user-avatar').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
+ // init the cropping
+ $('#user-avatar').imgAreaSelect({
+ selectionOpacity: 0,
+ aspectRatio: '1:1',
+ onSelectEnd: selectChange,
+ onSelectChange: preview
+ });
});
</script>