Removed animation from manual browsing

This commit is contained in:
ville rantanen
2014-02-24 12:27:56 +02:00
parent 5d4dd60a77
commit 222170e54c

View File

@@ -964,11 +964,18 @@ function showimage(i) {
thumblist(i,i);
var dirStr=$('#imagecontainer').data('ID')<i ? '-' : '+';
var revDirStr=dirStr=='-' ? '+' : '-';
var animateOut=(slideshowinterval!=0 && Math.abs(slideshowinterval)<2) ? 0 : 100;
var animateIn=animateOut/2;
$('#desccontainer').html(getProgressEl()+currentlink(i)+imagelist[i].desc);
$('#desccontainer').css('display','block');
setProgress(i);
if (slideshowinterval==0) { // Manual image change, no animation
showbigimage(i);
preload(i);
subfoldersmalllist();
currentimage=i;
return
}
var animateOut=(slideshowinterval!=0 && Math.abs(slideshowinterval)<2) ? 0 : 200;
var animateIn=animateOut/2;
$('#imagecontainer').clearQueue();
$('#imagecontainer').stop();
$('#imagecontainer').css('margin-left', '0px');
@@ -987,13 +994,14 @@ function showimage(i) {
'opacity' : "+=1"
},animateIn);
});
return;
}
function showbigimage(i) {
// The medium version of image in the big image container
if (i==-1) { return; }
var dirRight=$('#imagecontainer').data('ID')<i;
var width=document.body.clientWidth-30;
var height=document.body.clientHeight-225;
if (fullscreen) { height=height+200; }
@@ -1031,6 +1039,11 @@ function showbigimage(i) {
if (currentimage>(imagelist.length-1)) { currentimage=0; }
showimage(currentimage);
});
if (dirRight) { var $dirEl=$('#nextTouch'); } else { var $dirEl=$('#prevTouch'); }
$dirEl.css("background-color","rgba(238,238,238,0.5)");
setTimeout(function(){
$dirEl.css("background", "");
}, 100);
if (fullscreen) {
$('#imagecontainer')[0].scrollIntoView(true);