diff options
author | Robin Appelman <robin@icewind.nl> | 2016-10-20 15:57:34 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-10-20 15:57:34 +0200 |
commit | 5a44b70efccca4a5028dee26e09dfd00a9038f53 (patch) | |
tree | d7aaca0b2a7d325730b07aaed7e7a321eb9221d1 /settings | |
parent | ed4ed7911a9329462fef02c2d50709b3f092538e (diff) | |
download | nextcloud-server-5a44b70efccca4a5028dee26e09dfd00a9038f53.tar.gz nextcloud-server-5a44b70efccca4a5028dee26e09dfd00a9038f53.zip |
Prevent flashing the full sized image when cropping an avatar
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/personal.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index dbc82758fd1..9f4a4f377b3 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -129,8 +129,9 @@ function updateAvatar (hidedefault) { function showAvatarCropper () { var $cropper = $('#cropper'); - $cropper.prepend("<img>"); - var $cropperImage = $('#cropper img'); + var $cropperImage = $('<img/>'); + $cropperImage.css('opacity', 0); + $cropper.prepend($cropperImage); $cropperImage.attr('src', OC.generateUrl('/avatar/tmp') + '?requesttoken=' + encodeURIComponent(oc_requesttoken) + '#' + Math.floor(Math.random() * 1000)); @@ -147,6 +148,8 @@ function showAvatarCropper () { boxHeight: 500, boxWidth: 500, setSelect: [0, 0, 300, 300] + }, function() { + $cropperImage.css('opacity', 1); }); }); } |