How do you stop an animation?
I currently have my seadragon implementation start a slow zoom into the image after a couple of seconds, I've done this by setting the springstiffness to -5 (to get a slow start, fast stop) and then using zoomTo to zoom in on a point. I need to stop the animation and reset the springstiffness to 5 when the mouse enters. How would I go about this?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?If you want to get a slow start -> fast middle -> slow ending, check out my implementation at www.appletree.com. I wait until the mouse is clicked or the scrollwheel is moved to stop the animation, but it should be fairly easy to change this to whenever the mouse enters the element or is moved:
function stopDemoAnimation() {
Seadragon.Utils.removeEvent(viewer.elmt, "click", stopDemoAnimation);
Seadragon.Utils.removeEvent(viewer.elmt, "mousewheel", stopDemoAnimation);
if (_timerId > 0)
window.clearInterval(_timerId);
if (_newTransitionTimerId > 0)
window.clearTimeout(_newTransitionTimerId);
}
Loading Profile...



