Merge pull request #19394 from owncloud/18203-math-ceil
Switch from Math.floor() to Math.ceil() when sending the dimension to Preview
This commit is contained in:
commit
8fc46ef288
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue