diff --git a/js/bloch-sphere/model/BlochSphereModel.ts b/js/bloch-sphere/model/BlochSphereModel.ts index 143f048..9fee6a3 100644 --- a/js/bloch-sphere/model/BlochSphereModel.ts +++ b/js/bloch-sphere/model/BlochSphereModel.ts @@ -165,7 +165,12 @@ export default class BlochSphereModel implements TModel { * Resets the model. */ public reset(): void { - // no-op + this.preparationBlochSphere.reset(); + this.selectedSceneProperty.reset(); + this.readyToObserveProperty.reset(); + this.magneticFieldStrengthProperty.reset(); + this.measurementBasisProperty.reset(); + this.isSingleMeasurementModeProperty.reset(); } /** diff --git a/js/bloch-sphere/view/BlochSphereScreenView.ts b/js/bloch-sphere/view/BlochSphereScreenView.ts index 5f6836f..c4cb6c7 100644 --- a/js/bloch-sphere/view/BlochSphereScreenView.ts +++ b/js/bloch-sphere/view/BlochSphereScreenView.ts @@ -19,10 +19,14 @@ import BlochSpherePreparationArea from './BlochSpherePreparationArea.js'; export default class BlochSphereScreenView extends QuantumMeasurementScreenView { + private readonly model: BlochSphereModel; + public constructor( model: BlochSphereModel, tandem: Tandem ) { super( { tandem: tandem } ); + this.model = model; + const preparationArea = new BlochSpherePreparationArea( model, this, { left: this.layoutBounds.left + 20, top: this.layoutBounds.top + 20, @@ -68,10 +72,10 @@ export default class BlochSphereScreenView extends QuantumMeasurementScreenView top: measurementAreaTitleAndComboBox.bottom + 20 } ); this.addChild( measurementArea ); - } public override reset(): void { + this.model.reset(); super.reset(); } }