summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-06-12 18:56:18 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-07-02 13:27:14 +0200
commit62fa899fd20ef1cccf8c73e39db8c683d7d0ac54 (patch)
treee76b543976de15b6d4ac75ed455156d8e5d08bc6 /apps/files_sharing
parenta20487907bd1922ade6b9533745c70d468ca193e (diff)
downloadnextcloud-server-62fa899fd20ef1cccf8c73e39db8c683d7d0ac54.tar.gz
nextcloud-server-62fa899fd20ef1cccf8c73e39db8c683d7d0ac54.zip
floats are not welcome when setting the size of a preview
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/js/public.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 19f31aa7104..c2dd6d3ed38 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -88,8 +88,8 @@ OCA.Sharing.PublicApp = {
// dynamically load image previews
var params = {
- x: $(document).width() * window.devicePixelRatio,
- y: $(document).height() * window.devicePixelRatio,
+ x: Math.floor($(document).width() * window.devicePixelRatio),
+ y: Math.floor($(document).height() * window.devicePixelRatio),
a: 'true',
file: encodeURIComponent(this.initialDir + $('#filename').val()),
t: $('#sharingToken').val(),
@@ -147,8 +147,8 @@ OCA.Sharing.PublicApp = {
this.fileList.generatePreviewUrl = function (urlSpec) {
urlSpec.t = $('#dirToken').val();
- urlSpec.y = 36 * window.devicePixelRatio;
- urlSpec.x = 36 * window.devicePixelRatio;
+ urlSpec.y = Math.floor(36 * window.devicePixelRatio);
+ urlSpec.x = Math.floor(36 * window.devicePixelRatio);
return OC.generateUrl('/apps/files_sharing/ajax/publicpreview.php?') + $.param(urlSpec);
};