Truncate preview resolution

This prevents having float numbers appear in the URL
This commit is contained in:
Vincent Petry 2015-06-11 17:17:40 +02:00
parent cda9685c0e
commit d256425aba
1 changed files with 3 additions and 1 deletions

View File

@ -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);
},