Added fullscreen on mobile

This commit is contained in:
Tobias Reich 2014-03-25 15:15:40 +01:00
parent 2dd6613118
commit 28638d2163
2 changed files with 13 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -33,7 +33,9 @@ view = {
},
hide: function() {
hide: function(e, delay) {
if (delay===undefined) delay = 500;
if (visible.photo()&&!visible.infobox()&&!visible.contextMenu()&&!visible.message()) {
clearTimeout($(window).data("timeout"));
@ -53,7 +55,7 @@ view = {
left: 0
});
}
}, 500));
}, delay));
}
},
@ -375,6 +377,14 @@ view = {
.bind("mouseenter", view.header.show)
.bind("mouseleave", view.header.hide);
// Fullscreen on mobile
if (mobileBrowser()) {
$(document).on("touchend", "#image", function() {
if (visible.controls()) view.header.hide(null, 0);
else view.header.show();
});
}
lychee.animate(lychee.imageview, "fadeIn");
},