From abd9328b653fba809799cfcdd42a76e2016671d7 Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Thu, 4 Mar 2021 19:21:46 -0700 Subject: [PATCH] set visibleProperty for PointOnParabolaManipulator, #148 --- .../view/FocusAndDirectrixGraphNode.js | 2 +- .../view/PointOnParabolaManipulator.js | 10 +--------- js/graphing-quadratics-phet-io-overrides.js | 3 --- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/js/focusanddirectrix/view/FocusAndDirectrixGraphNode.js b/js/focusanddirectrix/view/FocusAndDirectrixGraphNode.js index 78407a44..e6e72494 100644 --- a/js/focusanddirectrix/view/FocusAndDirectrixGraphNode.js +++ b/js/focusanddirectrix/view/FocusAndDirectrixGraphNode.js @@ -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' } ); diff --git a/js/focusanddirectrix/view/PointOnParabolaManipulator.js b/js/focusanddirectrix/view/PointOnParabolaManipulator.js index 4335c8e9..9a29f13c 100644 --- a/js/focusanddirectrix/view/PointOnParabolaManipulator.js +++ b/js/focusanddirectrix/view/PointOnParabolaManipulator.js @@ -25,12 +25,10 @@ class PointOnParabolaManipulator extends GQManipulator { * @param {Property.} 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( { @@ -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; - } ); } } diff --git a/js/graphing-quadratics-phet-io-overrides.js b/js/graphing-quadratics-phet-io-overrides.js index 9e99139d..fa4cc885 100644 --- a/js/graphing-quadratics-phet-io-overrides.js +++ b/js/graphing-quadratics-phet-io-overrides.js @@ -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 },