diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-28 09:33:39 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-28 09:33:39 +0200 |
commit | 8fc46ef288eaa56a11319b74f4b87c3fd6b3cabf (patch) | |
tree | 0961a9cd3ec4b624ab97dd983ccc2dd5a2200eaa | |
parent | 77a874ba3858110a07295ba8ded369e462126d36 (diff) | |
parent | 46475b81147633060cd24f026d54eee77aa559d2 (diff) | |
download | nextcloud-server-8fc46ef288eaa56a11319b74f4b87c3fd6b3cabf.tar.gz nextcloud-server-8fc46ef288eaa56a11319b74f4b87c3fd6b3cabf.zip |
Merge pull request #19394 from owncloud/18203-math-ceil
Switch from Math.floor() to Math.ceil() when sending the dimension to Preview
-rw-r--r-- | apps/files/js/filelist.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/js/public.js | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index ad3dce19778..8eaae74d3c3 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1393,8 +1393,8 @@ } urlSpec.x *= window.devicePixelRatio; urlSpec.y *= window.devicePixelRatio; - urlSpec.x = Math.floor(urlSpec.x); - urlSpec.y = Math.floor(urlSpec.y); + urlSpec.x = Math.ceil(urlSpec.x); + urlSpec.y = Math.ceil(urlSpec.y); urlSpec.forceIcon = 0; return OC.generateUrl('/core/preview.png?') + $.param(urlSpec); }, diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 4908968a937..6a6095317af 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -90,8 +90,8 @@ OCA.Sharing.PublicApp = { // dynamically load image previews var token = $('#sharingToken').val(); var bottomMargin = 350; - var previewWidth = Math.floor($(window).width() * window.devicePixelRatio); - var previewHeight = Math.floor(($(window).height() - bottomMargin) * window.devicePixelRatio); + var previewWidth = Math.ceil($(window).width() * window.devicePixelRatio); + var previewHeight = Math.ceil(($(window).height() - bottomMargin) * window.devicePixelRatio); previewHeight = Math.max(200, previewHeight); var params = { x: previewWidth, @@ -168,8 +168,8 @@ OCA.Sharing.PublicApp = { } urlSpec.x *= window.devicePixelRatio; urlSpec.y *= window.devicePixelRatio; - urlSpec.x = Math.floor(urlSpec.x); - urlSpec.y = Math.floor(urlSpec.y); + urlSpec.x = Math.ceil(urlSpec.x); + urlSpec.y = Math.ceil(urlSpec.y); urlSpec.t = $('#dirToken').val(); return OC.generateUrl('/apps/files_sharing/ajax/publicpreview.php?') + $.param(urlSpec); }; |