]> source.dussan.org Git - nextcloud-server.git/commitdiff
use smaller cropper on small screens 1828/head
authorRobin Appelman <robin@icewind.nl>
Mon, 24 Oct 2016 11:56:21 +0000 (13:56 +0200)
committerRobin Appelman <robin@icewind.nl>
Mon, 24 Oct 2016 11:56:21 +0000 (13:56 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
settings/js/personal.js

index 34fffe7dddebdc92f3f3dd1215f73d2624783c7c..ae23782443caa5e3dd7ceec2668b81a8b09f800e 100644 (file)
@@ -148,8 +148,8 @@ function showAvatarCropper () {
                        onChange: saveCoords,
                        onSelect: saveCoords,
                        aspectRatio: 1,
-                       boxHeight: 500,
-                       boxWidth: 500,
+                       boxHeight: Math.min(500, $('#app-content').height() -100),
+                       boxWidth: Math.min(500, $('#app-content').width()),
                        setSelect: [offsetX, offsetY, selectSize, selectSize]
                }, function() {
                        $cropper.show();