Animations use timeout interrupts to draw/redraw the DIVs several
times. Thus, animations are performed asynchronously. Fortunately,
there is a core Slider function that is called when the animation has
ended. You can hijack this function to perform "post-animation"
handling. I've done exactly this in NestedSliderPlugin (to fixup the
overflow param after animation, so that nested sliders don't get
incorrecty clipped).
Here's the code from http://www.TiddlyTools.com/#NestedSlidersPlugin:
-------------------
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function() { this.coreStop();
this.element.style.overflow = "visible"; }
HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
> I ran into a bit of a problem which may or may not be a bug.
> If you have some code that closes a tiddler and then checks if the story is
> empty - with animations turned on - the story.isEmpty returns false.
> Possibly since the tiddler hasnt finished closing. With animations turned
> off everything works as it should.
Animations use timeout interrupts to draw/redraw the DIVs several
times. Thus, animations are performed asynchronously. Fortunately,
there is a core Slider function that is called when the animation has
ended. You can hijack this function to perform "post-animation"
handling. I've done exactly this in NestedSliderPlugin (to fixup the
overflow param after animation, so that nested sliders don't get
incorrecty clipped).