]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix resizing images in image viewer
authorRobin Appelman <icewind1991@gmail.com>
Thu, 21 Jul 2011 21:30:00 +0000 (23:30 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Thu, 21 Jul 2011 21:30:00 +0000 (23:30 +0200)
apps/files_imageviewer/js/lightbox.js

index 25da2bc6835320bc03e7ade1af34dc9bc6a35834..6e45547ebb4bdb3bd81e4b206cfa36b7c6c1ca40 100644 (file)
@@ -36,7 +36,7 @@ function showLightbox(container,img){
                        img.width = maxHeight * ratio;
                } else {
                        img.width = maxWidth;
-                       img.height = maxWidth * ratio;
+                       img.height = maxWidth / ratio;
                }
        }
        container.empty();
@@ -55,4 +55,4 @@ function hideLightbox(){
                $('#lightbox').hide();
                lightBoxShown=false;
        }
-}
\ No newline at end of file
+}