Skip to content

Commit

Permalink
Implementing live changes for phetio, see #63
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Dec 17, 2024
1 parent 93ff689 commit f0be317
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/photons/view/PhotonsExperimentSceneView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class PhotonsExperimentSceneView extends Node {

// center position empirically determined to match design doc
center: new Vector2( 420, 225 ),

phetioVisiblePropertyInstrumented: false,
tandem: providedOptions.tandem.createTandem( 'photonTestingArea' )
} );

Expand Down
6 changes: 4 additions & 2 deletions js/spin/view/SpinStatePreparationArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
import DerivedStringProperty from '../../../../axon/js/DerivedStringProperty.js';
import { GatedVisibleProperty } from '../../../../axon/js/GatedBooleanProperty.js';
import Bounds2 from '../../../../dot/js/Bounds2.js';
import Utils from '../../../../dot/js/Utils.js';
import Vector2 from '../../../../dot/js/Vector2.js';
Expand Down Expand Up @@ -65,14 +66,15 @@ export default class SpinStatePreparationArea extends VBox {
};
};

const spinStateRadioButtonGroupTandem = tandem.createTandem( 'spinStateRadioButtonGroup' );
const spinStateRadioButtonGroup = new RectangularRadioButtonGroup(
model.particleSourceModel.spinStateProperty,
SpinDirection.enumeration.values.map( quantity => createRadioButtonGroupItem( quantity ) ),
{
spacing: 10,
center: new Vector2( 100, 100 ),
tandem: tandem.createTandem( 'spinStateRadioButtonGroup' ),
visibleProperty: new DerivedProperty( [ model.currentExperimentProperty ], currentExperiment => currentExperiment !== SpinExperiment.CUSTOM ),
tandem: spinStateRadioButtonGroupTandem,
visibleProperty: new GatedVisibleProperty( new DerivedProperty( [ model.currentExperimentProperty ], currentExperiment => currentExperiment !== SpinExperiment.CUSTOM ), spinStateRadioButtonGroupTandem ),
radioButtonOptions: {
minWidth: 200,
baseColor: QuantumMeasurementColors.controlPanelFillColorProperty
Expand Down

0 comments on commit f0be317

Please sign in to comment.