diff options
author | setnes <kristopher@setnes.net> | 2015-06-07 00:06:07 +0300 |
---|---|---|
committer | setnes <kristopher@setnes.net> | 2015-06-07 00:06:07 +0300 |
commit | b376842573b12e71c6400a5262a0ce2988eb3ef8 (patch) | |
tree | 9e80f65ca547044c47510485fe3345966a2c5dfe /js/galleryfileaction.js | |
parent | 8c0bcfb7e647d595e6b6fbd5da25520dadd30bcf (diff) |
Use screen size instead of window size to request previews.
Fixes #166
The images created will work if the user goes into fullscreen mode or
maximizes the browser window while the slideshow is playing.
Diffstat (limited to 'js/galleryfileaction.js')
-rw-r--r-- | js/galleryfileaction.js | 4 |
1 files changed, 2 insertions, 2 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 ); |