Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
isAnimateがfalseにならない時があるのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
otto committed Nov 27, 2013
1 parent 1116072 commit 21f8502
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 27 deletions.
30 changes: 17 additions & 13 deletions dist/jquery-supergallery-plugin2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! jQuery Supergallery Plugin2 2013-09-09
/*! jQuery Supergallery Plugin2 2013-11-27
* Vertion : 1.3.3
* Dependencies : jQuery 1.8.0 - 2.0.3
* Author : Otto Kamiya (MegazalRock)
Expand Down Expand Up @@ -177,7 +177,10 @@
}else if(n === 'prev'){
n = (sg.current - 1 >= 0) ? sg.current - 1 : (sg.o.other.loop) ? sg.length - 1 : sg.current;
}
if(n === sg.current){ return false;}
if(n === sg.current){
sg.isAnimate = false;
return false;
}

if(!sg.o.other.disablePageChangeStartEvent){
sg.$target.trigger('pageChangeStart',n);
Expand Down Expand Up @@ -256,11 +259,11 @@
.transition({
left:0
},duration,sg.o.animation.easing);
$_oldTarget
.stop(true,false)
.transition({
left:endPos
},duration,sg.o.animation.easing,targetAnimationComplete);
$_oldTarget
.stop(true,false)
.transition({
left:endPos
},duration,sg.o.animation.easing,targetAnimationComplete);
}else{
$_target
.css({
Expand All @@ -271,11 +274,11 @@
.animate({
left:0
},duration,sg.o.animation.easing);
$_oldTarget
.stop(true,false)
.animate({
left:endPos
},duration,sg.o.animation.easing,targetAnimationComplete);
$_oldTarget
.stop(true,false)
.animate({
left:endPos
},duration,sg.o.animation.easing,targetAnimationComplete);
}

}
Expand Down Expand Up @@ -490,7 +493,8 @@
supergallery:function(_o){
$(this)
.each(function(){
new Supergallery(this,_o);
var sg = new Supergallery(this,_o);
$(this).data('supergallery',sg);
});
return this;
}
Expand Down

0 comments on commit 21f8502

Please sign in to comment.