only show cropper dialog when the cropper is ready

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2016-10-20 16:25:11 +02:00
parent 9983b5533a
commit 154fbe06ce
No known key found for this signature in database
GPG key ID: 425003AC385454C5

View file

@ -139,7 +139,6 @@ function showAvatarCropper () {
// Looks weird, but on('load', ...) doesn't work in IE8
$cropperImage.ready(function () {
$('#displayavatar').hide();
$cropper.show();
$cropperImage.Jcrop({
onChange: saveCoords,
@ -148,6 +147,8 @@ function showAvatarCropper () {
boxHeight: 500,
boxWidth: 500,
setSelect: [0, 0, 300, 300]
}, function() {
$cropper.show();
});
});
}