Added fullscreen on mobile

pull/104/head
Tobias Reich 11 years ago
parent 2dd6613118
commit 28638d2163

File diff suppressed because one or more lines are too long

@ -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()) { if (visible.photo()&&!visible.infobox()&&!visible.contextMenu()&&!visible.message()) {
clearTimeout($(window).data("timeout")); clearTimeout($(window).data("timeout"));
@ -53,7 +55,7 @@ view = {
left: 0 left: 0
}); });
} }
}, 500)); }, delay));
} }
}, },
@ -375,6 +377,14 @@ view = {
.bind("mouseenter", view.header.show) .bind("mouseenter", view.header.show)
.bind("mouseleave", view.header.hide); .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"); lychee.animate(lychee.imageview, "fadeIn");
}, },

Loading…
Cancel
Save