diff options
author | Olivier Paroz <github@oparoz.com> | 2015-09-27 12:46:25 +0200 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-09-27 12:46:25 +0200 |
commit | 46475b81147633060cd24f026d54eee77aa559d2 (patch) | |
tree | 6ff2a13ce2ddfdace37916c63215ea336fd88f7d /apps/files_sharing/js | |
parent | fe54d76e3dd047876847cebb63ed469c3273cf0a (diff) | |
download | nextcloud-server-46475b81147633060cd24f026d54eee77aa559d2.tar.gz nextcloud-server-46475b81147633060cd24f026d54eee77aa559d2.zip |
Switch from Math.floor() to Math.ceil() when sending the dimension to Preview
Fixes #18203
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/public.js | 8 |
1 files changed, 4 insertions, 4 deletions
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); }; |