summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-06-11 17:17:40 +0200
committerVincent Petry <pvince81@owncloud.com>2015-06-11 17:17:40 +0200
commitd256425abadd4f1ab247d0e0efdca6319c527ca9 (patch)
tree15aa3c74a0169ef435bae313db6fb3bf3117d820 /apps
parentcda9685c0ece25fe99a8046a94f06f145191a09d (diff)
downloadnextcloud-server-d256425abadd4f1ab247d0e0efdca6319c527ca9.tar.gz
nextcloud-server-d256425abadd4f1ab247d0e0efdca6319c527ca9.zip
Truncate preview resolution
This prevents having float numbers appear in the URL
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index e88ea1ad5d7..b6f464bfd29 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1173,8 +1173,10 @@
if (!urlSpec.y) {
urlSpec.y = this.$table.data('preview-y') || 36;
}
- urlSpec.y *= window.devicePixelRatio;
urlSpec.x *= window.devicePixelRatio;
+ urlSpec.y *= window.devicePixelRatio;
+ urlSpec.x = Math.floor(urlSpec.x);
+ urlSpec.y = Math.floor(urlSpec.y);
urlSpec.forceIcon = 0;
return OC.generateUrl('/core/preview.png?') + $.param(urlSpec);
},