[Pkg-owncloud-commits] [owncloud] 14/58: floats are not welcome when setting the size of a preview

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 15:58:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.0.6
in repository owncloud.

commit 62fa899fd20ef1cccf8c73e39db8c683d7d0ac54
Author: Olivier Paroz <github at oparoz.com>
Date:   Fri Jun 12 18:56:18 2015 +0200

    floats  are not welcome when setting the size of a preview
---
 apps/files_sharing/js/public.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 19f31aa..c2dd6d3 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);
 			};
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list