From d256425abadd4f1ab247d0e0efdca6319c527ca9 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 11 Jun 2015 17:17:40 +0200 Subject: Truncate preview resolution This prevents having float numbers appear in the URL --- apps/files/js/filelist.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/files/js/filelist.js') 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); }, -- cgit v1.2.3