Removed duplicated timeout for header.
Because of that, the timeout for going into fullscreen mode has been changed from 500ms to 1s.
This commit is contained in:
parent
e41b0f81bd
commit
8181bd6ce6
@ -67,8 +67,6 @@ header.bind = function() {
|
||||
|
||||
header.show = function() {
|
||||
|
||||
clearTimeout($(window).data('timeout'))
|
||||
|
||||
lychee.imageview.removeClass('full')
|
||||
header.dom().removeClass('header--hidden')
|
||||
|
||||
@ -76,19 +74,13 @@ 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))
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
})
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user