Skip to content

Commit

Permalink
stop animation when pageNumber changes, regardless of whether animati…
Browse files Browse the repository at this point in the history
…on is enabled, #222
  • Loading branch information
pixelzoom committed Jan 29, 2016
1 parent 3d2cd0f commit 163252c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ define( function( require ) {
previousButton.visible = previousButton.enabled;
}

if ( thisCarousel._animationEnabled ) {
// stop any animation that's in progress
scrollTween && scrollTween.stop();

// stop any animation that's in progress
scrollTween && scrollTween.stop();
if ( thisCarousel._animationEnabled ) {

//TODO replace calls to Tween with a wrapper, see https://github.com/phetsims/tasks/issues/360
// Set up the animation to scroll the items in the carousel.
Expand Down

0 comments on commit 163252c

Please sign in to comment.