Skip to content

Commit

Permalink
Don't animate the carousel while setting phet-io state, see phetsims/…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 19, 2022
1 parent 02a7c1b commit 19743bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ class Carousel extends Node {
// stop any animation that's in progress
scrollAnimation && scrollAnimation.stop();

if ( this._animationEnabled ) {
// Only animate if animation is enabled and PhET-iO state is not being set. When PhET-iO state is being set (as
// in loading a customized state), the carousel should immediately reflect the desired page
if ( this._animationEnabled && !phet.joist.sim.isSettingPhetioStateProperty.value ) {

// options that are independent of orientation
let animationOptions = {
Expand Down

0 comments on commit 19743bb

Please sign in to comment.