From b376842573b12e71c6400a5262a0ce2988eb3ef8 Mon Sep 17 00:00:00 2001 From: setnes Date: Sat, 6 Jun 2015 16:06:07 -0500 Subject: 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. --- js/galleryfileaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/galleryfileaction.js') 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 ); -- cgit v1.2.3