Skip to content

Commit

Permalink
visibleProperty phetioReadOnly: true, #106
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Feb 7, 2020
1 parent 039a94a commit d2619df
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 23 deletions.
6 changes: 5 additions & 1 deletion js/common/view/MoleculeCountNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ define( require => {

// phet-io
tandem: Tandem.REQUIRED,
phetioReadOnly: true // controlled by PHScaleViewProperties.moleculeCountVisibleProperty
phetioComponentOptions: {
visibleProperty: {
phetioReadOnly: true
}
}
}, options );

super();
Expand Down
6 changes: 5 additions & 1 deletion js/common/view/RatioNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ define( require => {

// phet-io
tandem: Tandem.REQUIRED,
phetioReadOnly: true // controlled by PHScaleViewProperties.ratioVisibleProperty
phetioComponentOptions: {
visibleProperty: {
phetioReadOnly: true
}
}
}, options );

super();
Expand Down
7 changes: 6 additions & 1 deletion js/common/view/graph/LinearGraphNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ define( require => {
majorTickXSpacing: 5,

// phet-io
tandem: Tandem.REQUIRED
tandem: Tandem.REQUIRED,
phetioComponentOptions: {
visibleProperty: {
phetioReadOnly: true
}
}
}, options );

super();
Expand Down
7 changes: 6 additions & 1 deletion js/common/view/graph/LogarithmicGraphNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ define( require => {
indicatorXOffset: 10,

// phet-io
tandem: Tandem.REQUIRED
tandem: Tandem.REQUIRED,
phetioComponentOptions: {
visibleProperty: {
phetioReadOnly: true
}
}
}, options );

super();
Expand Down
14 changes: 12 additions & 2 deletions js/common/view/graph/ZoomButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,25 @@ define( require => {
radius: MAGNIFYING_GLASS_RADIUS,
listener: () => exponentProperty.set( exponentProperty.get() + 1 ),
tandem: options.tandem.createTandem( 'zoomOutButton' ),
phetioDocumentation: 'zoom out button for the linear scale'
phetioDocumentation: 'zoom out button for the linear scale',
phetioComponentOptions: {
visibleProperty: {
phetioReadOnly: true
}
}
} );

const zoomInButton = new ZoomButton( {
in: true,
radius: MAGNIFYING_GLASS_RADIUS,
listener: () => exponentProperty.set( exponentProperty.get() - 1 ),
tandem: options.tandem.createTandem( 'zoomInButton' ),
phetioDocumentation: 'zoom in button for the linear scale'
phetioDocumentation: 'zoom in button for the linear scale',
phetioComponentOptions: {
visibleProperty: {
phetioReadOnly: true
}
}
} );

// expand touch areas
Expand Down
34 changes: 17 additions & 17 deletions js/phet-io/ph-scale-phet-io-elements-baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -7757,7 +7757,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
Expand Down Expand Up @@ -7913,7 +7913,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
Expand Down Expand Up @@ -8017,7 +8017,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
Expand Down Expand Up @@ -8225,7 +8225,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
Expand Down Expand Up @@ -8277,7 +8277,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": false,
"phetioStudioControl": true,
"phetioTypeName": "NodeIO"
Expand All @@ -8290,7 +8290,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
Expand All @@ -8303,7 +8303,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<NullableIO<BooleanIO>>"
Expand Down Expand Up @@ -8654,7 +8654,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": false,
"phetioStudioControl": true,
"phetioTypeName": "NodeIO"
Expand All @@ -8667,7 +8667,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
Expand All @@ -8680,7 +8680,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<NullableIO<BooleanIO>>"
Expand Down Expand Up @@ -11306,7 +11306,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioReadOnly": true,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
Expand Down Expand Up @@ -11358,7 +11358,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": false,
"phetioStudioControl": true,
"phetioTypeName": "NodeIO"
Expand All @@ -11371,7 +11371,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
Expand All @@ -11384,7 +11384,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<NullableIO<BooleanIO>>"
Expand Down Expand Up @@ -11878,7 +11878,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": false,
"phetioStudioControl": true,
"phetioTypeName": "NodeIO"
Expand All @@ -11891,7 +11891,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
Expand All @@ -11904,7 +11904,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": true,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<NullableIO<BooleanIO>>"
Expand Down

0 comments on commit d2619df

Please sign in to comment.