Skip to content

Commit

Permalink
set visibleProperty for PointOnParabolaManipulator, #148
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 5, 2021
1 parent 3e4c969 commit abd9328
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion js/focusanddirectrix/view/FocusAndDirectrixGraphNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class FocusAndDirectrixGraphNode extends GQGraphNode {
model.quadraticProperty,
model.graph,
model.modelViewTransform,
viewProperties.pointOnParabolaVisibleProperty,
viewProperties.coordinatesVisibleProperty, {
visibleProperty: viewProperties.pointOnParabolaVisibleProperty,
tandem: tandem.createTandem( 'pointOnParabolaManipulator' ),
phetioDocumentation: 'the manipulator for changing the point on the parabola'
} );
Expand Down
10 changes: 1 addition & 9 deletions js/focusanddirectrix/view/PointOnParabolaManipulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ class PointOnParabolaManipulator extends GQManipulator {
* @param {Property.<Quadratic>} quadraticProperty - the interactive quadratic
* @param {Graph} graph
* @param {ModelViewTransform2} modelViewTransform
* @param {BooleanProperty} pointOnParabolaVisibleProperty
* @param {BooleanProperty} coordinatesVisibleProperty
* @param {Object} [options]
*/
constructor( pointOnParabolaProperty, quadraticProperty, graph, modelViewTransform,
pointOnParabolaVisibleProperty, coordinatesVisibleProperty, options ) {
constructor( pointOnParabolaProperty, quadraticProperty, graph, modelViewTransform, coordinatesVisibleProperty, options ) {

options = merge( {

Expand Down Expand Up @@ -85,12 +83,6 @@ class PointOnParabolaManipulator extends GQManipulator {
pointOnParabolaProperty.link( pointOnParabola => {
this.translation = modelViewTransform.modelToViewPosition( pointOnParabola );
} );

// visibility of this Node
pointOnParabolaVisibleProperty.link( visible => {
this.interruptSubtreeInput(); // cancel any drag that is in progress
this.visible = visible;
} );
}
}

Expand Down
3 changes: 0 additions & 3 deletions js/graphing-quadratics-phet-io-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ window.phet.preloads.phetio.phetioElementsOverrides =
"graphingQuadratics.focusAndDirectrixScreen.view.leftPointToolNode.visibleProperty": {
"phetioFeatured": true
},
"graphingQuadratics.focusAndDirectrixScreen.view.pointOnParabolaManipulator.visibleProperty": {
"phetioReadOnly": true
},
"graphingQuadratics.focusAndDirectrixScreen.view.rightPointToolNode.visibleProperty": {
"phetioFeatured": true
},
Expand Down

0 comments on commit abd9328

Please sign in to comment.