From 89b4f56160cb9197722ebe6e66b4c1cfde09063a Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 25 Sep 2016 13:01:36 +0200 Subject: [PATCH] Improve auto-fullscreen delay #625 --- src/scripts/view.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/scripts/view.js b/src/scripts/view.js index 5489fea..65da54a 100644 --- a/src/scripts/view.js +++ b/src/scripts/view.js @@ -309,11 +309,11 @@ view.photo = { $('body').css('overflow', 'hidden') // Fullscreen - var timeout + let timeout = null $(document).bind('mousemove', function() { clearTimeout(timeout) header.show() - timeout = setTimeout(header.hide, 1000) + timeout = setTimeout(header.hide, 2500) }) lychee.animate(lychee.imageview, 'fadeIn') @@ -331,8 +331,7 @@ view.photo = { $('body').css('overflow', 'auto') // Disable Fullscreen - $(document) - .unbind('mousemove') + $(document).unbind('mousemove') // Hide Photo lychee.animate(lychee.imageview, 'fadeOut')