Skip to content

Commit

Permalink
Re arranging how the preparation area looks, see #53
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Nov 18, 2024
1 parent 965f215 commit c6eac41
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
5 changes: 3 additions & 2 deletions js/QuantumMeasurementStrings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ type StringsType = {
'representationStringProperty': LocalizedStringProperty;
'unpolarizedStringProperty': LocalizedStringProperty;
'unknownProbabilitySymbolStringProperty': LocalizedStringProperty;
'zProjectionStringProperty': LocalizedStringProperty;
'xProjectionStringProperty': LocalizedStringProperty;
'projectionStringProperty': LocalizedStringProperty;
'XStringProperty': LocalizedStringProperty;
'ZStringProperty': LocalizedStringProperty;
};

const QuantumMeasurementStrings = getStringModule( 'QUANTUM_MEASUREMENT' ) as StringsType;
Expand Down
20 changes: 10 additions & 10 deletions js/spin/view/SpinStatePreparationArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default class SpinStatePreparationArea extends VBox {
new HBox( {
spacing: 5,
children: [
new Text( QuantumMeasurementStrings.zProjectionStringProperty, { font: new PhetFont( 15 ) } ),
new Text( QuantumMeasurementStrings.ZStringProperty, { font: new PhetFont( 15 ) } ),
new DashedArrowNode( 0, 0, 0, -20, { stroke: 'blue', fill: 'blue', scale: 1 } )
]
} ),
Expand All @@ -157,7 +157,7 @@ export default class SpinStatePreparationArea extends VBox {
new HBox( {
spacing: 5,
children: [
new Text( QuantumMeasurementStrings.xProjectionStringProperty, { font: new PhetFont( 15 ) } ),
new Text( QuantumMeasurementStrings.XStringProperty, { font: new PhetFont( 15 ) } ),
new DashedArrowNode( 0, 0, 20, 0, { stroke: 'red', fill: 'red', scale: 1 } )
]
} ),
Expand All @@ -171,18 +171,18 @@ export default class SpinStatePreparationArea extends VBox {
super( {
children: [
blochSphereNode,
stateToPrepareText,
stateReadout,
spinStatePanel,
probabilityControlBox,
new VBox( {
new HBox( {
spacing: 20,
children: [
new Text( QuantumMeasurementStrings.projectionStringProperty, { font: new PhetFont( 15 ) } ),
zProjectionCheckbox,
xProjectionCheckbox
],
align: 'left'
} )
]
} ),
stateToPrepareText,
stateReadout,
spinStatePanel,
probabilityControlBox
],
spacing: 20,
centerY: layoutBounds.centerY
Expand Down
11 changes: 7 additions & 4 deletions quantum-measurement-strings_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,13 @@
"unknownProbabilitySymbol": {
"value": "?"
},
"zProjection": {
"value": "Z Projection"
"projection": {
"value": "Projection:"
},
"xProjection": {
"value": "X Projection"
"X": {
"value": "X"
},
"Z": {
"value": "Z"
}
}

0 comments on commit c6eac41

Please sign in to comment.