Avoid fullscreen when swiping
This commit is contained in:
parent
086131c222
commit
749c2cd9ab
File diff suppressed because one or more lines are too long
@ -104,6 +104,7 @@ $(document).ready(function(){
|
||||
/* Fullscreen on mobile */
|
||||
if (mobileBrowser()) {
|
||||
$(document).on("touchend", "#image", function(e) {
|
||||
if (swipe.obj!==null&&(swipe.offset<=-5||swipe.offset>=5)) return false;
|
||||
if (visible.controls()) view.header.hide(e, 0);
|
||||
else view.header.show();
|
||||
});
|
||||
|
@ -9,6 +9,7 @@ swipe = {
|
||||
|
||||
obj: null,
|
||||
tolerance: 150,
|
||||
offset: 0,
|
||||
|
||||
start: function(obj, tolerance) {
|
||||
|
||||
@ -25,12 +26,12 @@ swipe = {
|
||||
|
||||
console.log(e);
|
||||
|
||||
e.x *= -1;
|
||||
offset = -1 * e.x;
|
||||
|
||||
swipe.obj.css({
|
||||
WebkitTransform: 'translateX(' + e.x + 'px)',
|
||||
MozTransform: 'translateX(' + e.x + 'px)',
|
||||
transform: 'translateX(' + e.x + 'px)'
|
||||
WebkitTransform: 'translateX(' + offset + 'px)',
|
||||
MozTransform: 'translateX(' + offset + 'px)',
|
||||
transform: 'translateX(' + offset + 'px)'
|
||||
});
|
||||
|
||||
},
|
||||
@ -51,6 +52,7 @@ swipe = {
|
||||
}
|
||||
|
||||
swipe.obj = null;
|
||||
swipe.offset = 0;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user