Skip to content

Commit

Permalink
Addressing code review comments, see #109
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Feb 24, 2025
1 parent 3d900a2 commit a94ba38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 3 additions & 4 deletions js/bloch-sphere/model/BlochSphereModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/

import BooleanProperty from '../../../../axon/js/BooleanProperty.js';
import EnumerationProperty from '../../../../axon/js/EnumerationProperty.js';
import Multilink from '../../../../axon/js/Multilink.js';
import NumberProperty from '../../../../axon/js/NumberProperty.js';
import Property from '../../../../axon/js/Property.js';
Expand Down Expand Up @@ -91,9 +92,8 @@ class BlochSphereModel implements TModel {
tandem: preparationAreaTandem.createTandem( 'preparationBlochSphere' )
} );

this.selectedStateDirectionProperty = new Property( StateDirection.X_PLUS, {
this.selectedStateDirectionProperty = new EnumerationProperty( StateDirection.X_PLUS, {
tandem: preparationAreaTandem.createTandem( 'selectedStateDirectionProperty' ),
phetioValueType: EnumerationIO( StateDirection ),
phetioFeatured: true
} );

Expand All @@ -118,9 +118,8 @@ class BlochSphereModel implements TModel {
} );

// Selected Equation Basis
this.equationBasisProperty = new Property( StateDirection.Z_PLUS, {
this.equationBasisProperty = new EnumerationProperty( StateDirection.Z_PLUS, {
tandem: measurementAreaTandem.createTandem( 'equationBasisProperty' ),
phetioValueType: EnumerationIO( StateDirection ),
phetioFeatured: true,
validValues: QuantumMeasurementConstants.plusDirections
} );
Expand Down
3 changes: 3 additions & 0 deletions js/bloch-sphere/view/BlochSphereMeasurementArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export default class BlochSphereMeasurementArea extends Node {
align: 'left',
tandem: measurementControlsTandem,
children: [
// The panel contains multiple sections for a specific control and smaller spacing. Title and component
new VBox( {
spacing: boxSpacing,
children: [
Expand All @@ -255,6 +256,7 @@ export default class BlochSphereMeasurementArea extends Node {
],
tandem: numberOfAtomsControlTandem
} ),

new VBox( {
spacing: boxSpacing,
children: [
Expand All @@ -263,6 +265,7 @@ export default class BlochSphereMeasurementArea extends Node {
],
tandem: measurementAxisControlTandem
} ),

new VBox( {
spacing: boxSpacing,
children: [
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/BlochSphereNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default class BlochSphereNode extends Node {
bottom: upStateLabel.top - 10,
centerX: upStateLabel.centerX
} );
QuantumMeasurementStrings.blochSphereStringProperty.link( () => {
title.boundsProperty.link( () => {
title.centerX = upStateLabel.centerX;
} );

Expand Down

0 comments on commit a94ba38

Please sign in to comment.