Removed animation on desktop and arrows on mobile

This commit is contained in:
Tobias Reich 2014-03-27 22:53:34 +01:00
parent 7699fd0498
commit 942a922a45
5 changed files with 42 additions and 22 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -45,6 +45,10 @@
margin: 40px 0px 0px 50px !important;
}
#imageview .arrow_wrapper {
display: none !important;
}
.message {
position: fixed !important;
width: 100% !important;

View File

@ -56,43 +56,59 @@ photo = {
},
previous: function() {
previous: function(animate) {
var delay = 0;
if (album.json&&
album.json.content[photo.getID()]&&
album.json.content[photo.getID()].previousPhoto!=="") {
if (animate===true) {
delay = 100;
$("#image").css({
WebkitTransform: 'translateX(100px)',
MozTransform: 'translateX(100px)',
transform: 'translateX(100px)',
WebkitTransform: 'translateX(100%)',
MozTransform: 'translateX(100%)',
transform: 'translateX(100%)',
opacity: 0
});
}
setTimeout(function() {
lychee.goto(album.getID() + "/" + album.json.content[photo.getID()].previousPhoto)
}, 100);
}, delay);
}
},
next: function() {
next: function(animate) {
var delay = 0;
if (album.json&&
album.json.content[photo.getID()]&&
album.json.content[photo.getID()].nextPhoto!=="") {
if (animate===true) {
delay = 100;
$("#image").css({
WebkitTransform: 'translateX(-100px)',
MozTransform: 'translateX(-100px)',
transform: 'translateX(-100px)',
WebkitTransform: 'translateX(-100%)',
MozTransform: 'translateX(-100%)',
transform: 'translateX(-100%)',
opacity: 0
});
}
setTimeout(function() {
lychee.goto(album.getID() + "/" + album.json.content[photo.getID()].nextPhoto);
}, 100);
}, delay);
}

View File

@ -40,8 +40,8 @@ swipe = {
console.log('stop with ' + e.x);
if (e.x<=-swipe.tolerance) left();
else if (e.x>=swipe.tolerance) right();
if (e.x<=-swipe.tolerance) left(true);
else if (e.x>=swipe.tolerance) right(true);
else {
console.log('reset');
swipe.obj.css({