Skip to content

Commit

Permalink
do not instrument SolutionNode, #108
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Feb 7, 2020
1 parent 8151b44 commit 7ef53db
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 170 deletions.
9 changes: 4 additions & 5 deletions js/common/view/SolutionNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ define( require => {
const phScale = require( 'PH_SCALE/phScale' );
const PHScaleConstants = require( 'PH_SCALE/common/PHScaleConstants' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Tandem = require( 'TANDEM/Tandem' );
const Utils = require( 'DOT/Utils' );

class SolutionNode extends Rectangle {
Expand All @@ -28,12 +27,12 @@ define( require => {
constructor( solution, beaker, modelViewTransform, options ) {

options = merge( {
lineWidth: 1,

// phet-io
tandem: Tandem.REQUIRED
lineWidth: 1
}, options );

// See https://github.com/phetsims/ph-scale/issues/108
assert && assert( !options.tandem, 'do not instrument SolutionNode' );

super( 0, 0, 1, 1, options ); // correct size will be set below

/*
Expand Down
4 changes: 1 addition & 3 deletions js/macro/view/MacroScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ define( require => {
} );

// solution in the beaker
const solutionNode = new SolutionNode( model.solution, model.beaker, modelViewTransform, {
tandem: tandem.createTandem( 'solutionNode' )
} );
const solutionNode = new SolutionNode( model.solution, model.beaker, modelViewTransform );

// volume indicator on the right edge of beaker
const volumeIndicatorNode = new VolumeIndicatorNode( model.solution.volumeProperty, model.beaker, modelViewTransform, {
Expand Down
4 changes: 1 addition & 3 deletions js/micro/view/MicroScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ define( require => {
} );

// solution
const solutionNode = new SolutionNode( model.solution, model.beaker, modelViewTransform, {
tandem: tandem.createTandem( 'solutionNode' )
} );
const solutionNode = new SolutionNode( model.solution, model.beaker, modelViewTransform );

// volume indicator on right side of beaker
const volumeIndicatorNode = new VolumeIndicatorNode( model.solution.volumeProperty, model.beaker, modelViewTransform, {
Expand Down
4 changes: 1 addition & 3 deletions js/mysolution/view/MySolutionScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ define( require => {
} );

// solution in the beaker
const solutionNode = new SolutionNode( model.solution, model.beaker, modelViewTransform, {
tandem: tandem.createTandem( 'solutionNode' )
} );
const solutionNode = new SolutionNode( model.solution, model.beaker, modelViewTransform );

// volume indicator along the right edge of the beaker
const volumeIndicatorNode = new VolumeIndicatorNode( model.solution.volumeProperty, model.beaker, modelViewTransform, {
Expand Down
156 changes: 0 additions & 156 deletions js/phet-io/ph-scale-phet-io-elements-baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -5591,58 +5591,6 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScale.macroScreen.view.solutionNode": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": false,
"phetioStudioControl": true,
"phetioTypeName": "NodeIO"
},
"phScale.macroScreen.view.solutionNode.opacityProperty": {
"phetioDocumentation": "Opacity of the parent NodeIO, between 0 (invisible) and 1 (fully visible)",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
},
"phScale.macroScreen.view.solutionNode.pickableProperty": {
"phetioDocumentation": "Sets whether the node will be pickable (and hence interactive), see the NodeIO documentation for more details",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<NullableIO<BooleanIO>>"
},
"phScale.macroScreen.view.solutionNode.visibleProperty": {
"phetioDocumentation": "Controls whether the Node will be visible (and interactive), see the NodeIO documentation for more details.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScale.macroScreen.view.visibleProperty": {
"phetioDocumentation": "Controls whether the Node will be visible (and interactive), see the NodeIO documentation for more details.",
"phetioDynamicElement": false,
Expand Down Expand Up @@ -9751,58 +9699,6 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScale.microScreen.view.solutionNode": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": false,
"phetioStudioControl": true,
"phetioTypeName": "NodeIO"
},
"phScale.microScreen.view.solutionNode.opacityProperty": {
"phetioDocumentation": "Opacity of the parent NodeIO, between 0 (invisible) and 1 (fully visible)",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
},
"phScale.microScreen.view.solutionNode.pickableProperty": {
"phetioDocumentation": "Sets whether the node will be pickable (and hence interactive), see the NodeIO documentation for more details",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<NullableIO<BooleanIO>>"
},
"phScale.microScreen.view.solutionNode.visibleProperty": {
"phetioDocumentation": "Controls whether the Node will be visible (and interactive), see the NodeIO documentation for more details.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScale.microScreen.view.viewProperties.moleculeCountVisibleProperty": {
"phetioDocumentation": "controls visibility of the Molecule Count view",
"phetioDynamicElement": false,
Expand Down Expand Up @@ -12143,58 +12039,6 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScale.mySolutionsScreen.view.solutionNode": {
"phetioDocumentation": "",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": false,
"phetioStudioControl": true,
"phetioTypeName": "NodeIO"
},
"phScale.mySolutionsScreen.view.solutionNode.opacityProperty": {
"phetioDocumentation": "Opacity of the parent NodeIO, between 0 (invisible) and 1 (fully visible)",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "NumberPropertyIO"
},
"phScale.mySolutionsScreen.view.solutionNode.pickableProperty": {
"phetioDocumentation": "Sets whether the node will be pickable (and hence interactive), see the NodeIO documentation for more details",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<NullableIO<BooleanIO>>"
},
"phScale.mySolutionsScreen.view.solutionNode.visibleProperty": {
"phetioDocumentation": "Controls whether the Node will be visible (and interactive), see the NodeIO documentation for more details.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
"phetioHighFrequency": false,
"phetioIsArchetype": false,
"phetioPlayback": false,
"phetioReadOnly": false,
"phetioState": true,
"phetioStudioControl": true,
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"phScale.mySolutionsScreen.view.viewProperties.moleculeCountVisibleProperty": {
"phetioDocumentation": "controls visibility of the Molecule Count view",
"phetioDynamicElement": false,
Expand Down

0 comments on commit 7ef53db

Please sign in to comment.