Kaydet (Commit) 6bfaabf4 authored tarafından Marco Cecchetti's avatar Marco Cecchetti

Now a skip effect command cannot be executed if one skip effect is already running.

üst 6f3ab481
...@@ -11110,6 +11110,7 @@ function SlideShow() ...@@ -11110,6 +11110,7 @@ function SlideShow()
this.eDirection = FORWARD; this.eDirection = FORWARD;
this.bIsIdle = true; this.bIsIdle = true;
this.bIsEnabled = true; this.bIsEnabled = true;
this.bIsSkipping = false;
this.bNoSlideTransition = false; this.bNoSlideTransition = false;
} }
...@@ -11236,12 +11237,26 @@ SlideShow.prototype.nextEffect = function() ...@@ -11236,12 +11237,26 @@ SlideShow.prototype.nextEffect = function()
SlideShow.prototype.skipCurrentEffect = function() SlideShow.prototype.skipCurrentEffect = function()
{ {
if( this.bIsSkipping )
return;
this.bIsSkipping = true;
this.aEventMultiplexer.notifySkipEffectEvent(); this.aEventMultiplexer.notifySkipEffectEvent();
this.update(); this.update();
this.bIsSkipping = false;
}; };
SlideShow.prototype.skipEffect = function() SlideShow.prototype.skipEffect = function()
{ {
if( this.bIsSkipping )
return true;
if( this.isRunning() )
{
this.skipCurrentEffect();
return true;
}
if( !this.aNextEffectEventArray ) if( !this.aNextEffectEventArray )
return false; return false;
...@@ -11249,11 +11264,13 @@ SlideShow.prototype.skipEffect = function() ...@@ -11249,11 +11264,13 @@ SlideShow.prototype.skipEffect = function()
if( this.nCurrentEffect >= this.aNextEffectEventArray.size() ) if( this.nCurrentEffect >= this.aNextEffectEventArray.size() )
return false; return false;
this.bIsSkipping = true;
this.eDirection = FORWARD; this.eDirection = FORWARD;
this.aNextEffectEventArray.at( this.nCurrentEffect ).fire(); this.aNextEffectEventArray.at( this.nCurrentEffect ).fire();
this.aEventMultiplexer.notifySkipEffectEvent(); this.aEventMultiplexer.notifySkipEffectEvent();
++this.nCurrentEffect; ++this.nCurrentEffect;
this.update(); this.update();
this.bIsSkipping = false;
return true; return true;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment