diff --git a/src/scripts/header.js b/src/scripts/header.js index 6c4b81c..58f6f6e 100644 --- a/src/scripts/header.js +++ b/src/scripts/header.js @@ -67,8 +67,6 @@ header.bind = function() { header.show = function() { - clearTimeout($(window).data('timeout')) - lychee.imageview.removeClass('full') header.dom().removeClass('header--hidden') @@ -76,18 +74,12 @@ header.show = function() { } -header.hide = function(e, delay = 500) { +header.hide = function(e) { if (visible.photo() && !visible.sidebar() && !visible.contextMenu() && basicModal.visible()===false) { - clearTimeout($(window).data('timeout')) - - $(window).data('timeout', setTimeout(function() { - - lychee.imageview.addClass('full') - header.dom().addClass('header--hidden') - - }, delay)) + lychee.imageview.addClass('full') + header.dom().addClass('header--hidden') return true diff --git a/src/scripts/init.js b/src/scripts/init.js index 71520e5..de6211a 100755 --- a/src/scripts/init.js +++ b/src/scripts/init.js @@ -80,7 +80,7 @@ $(document).ready(function() { // Fullscreen on mobile .on('touchend', '#imageview #image', function(e) { if (swipe.obj==null || (swipe.offset>=-5&&swipe.offset<=5)) { - if (visible.header()) header.hide(e, 0) + if (visible.header()) header.hide(e) else header.show() } }) diff --git a/src/scripts/view.js b/src/scripts/view.js index fe10eaa..befae3f 100644 --- a/src/scripts/view.js +++ b/src/scripts/view.js @@ -313,7 +313,7 @@ view.photo = { $(document).bind('mousemove', function() { clearTimeout(timeout) header.show() - timeout = setTimeout(header.hide, 500) + timeout = setTimeout(header.hide, 1000) }) lychee.animate(lychee.imageview, 'fadeIn')