diff options
-rw-r--r-- | js/galleryfileaction.js | 4 | ||||
-rw-r--r-- | js/galleryutility.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/js/galleryfileaction.js b/js/galleryfileaction.js index 79122a87..30a71a81 100644 --- a/js/galleryfileaction.js +++ b/js/galleryfileaction.js @@ -59,8 +59,8 @@ var galleryFileAction = { var start = 0; var images = []; var dir = context.dir + '/'; - var width = Math.floor($(window).width() * window.devicePixelRatio); - var height = Math.floor($(window).height() * window.devicePixelRatio); + var width = Math.floor(screen.width * window.devicePixelRatio); + var height = Math.floor(screen.height * window.devicePixelRatio); /* Find value of longest edge. */ var longEdge = Math.max( width, height ); diff --git a/js/galleryutility.js b/js/galleryutility.js index c0a5faf8..8371d9e8 100644 --- a/js/galleryutility.js +++ b/js/galleryutility.js @@ -98,8 +98,8 @@ * @return {string} */ getPreviewUrl: function (fileId, etag) { - var width = $(window).width() * window.devicePixelRatio; - var height = $(window).height() * window.devicePixelRatio; + var width = Math.floor(screen.width * window.devicePixelRatio); + var height = Math.floor(screen.height * window.devicePixelRatio); /* Find value of longest edge. */ var longEdge = Math.max( width, height ); |