Skip to content

Commit

Permalink
Making sure classical coins animate with the initial state, see #28
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Sep 17, 2024
1 parent ca444b4 commit 5580d4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/coins/model/CoinsExperimentSceneModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ export default class CoinsExperimentSceneModel extends PhetioObject {
// The scene is moving from preparation mode to measurement mode. Force the coins to be in the initial state
// chosen by the user so that it will match when it animates into the test box and be correct if revealed right
// away.
this.singleCoin.setMeasurementValueImmediate( null as never );
const singleCoinInitialState = this.systemType === 'classical' ? this.initialCoinStateProperty.value as never : null as never;
this.singleCoin.setMeasurementValueImmediate( singleCoinInitialState );
this.coinSet.setMeasurementValuesImmediate( this.initialCoinStateProperty.value as QuantumCoinStates | ClassicalCoinStates );
}
} );
Expand Down

0 comments on commit 5580d4f

Please sign in to comment.