From cfeeab0053fee6fc60061c3874906517bf118198 Mon Sep 17 00:00:00 2001 From: Chris Malley Date: Sun, 14 Oct 2018 16:28:58 -0600 Subject: [PATCH] duplicate coordinatesVisibleProperty in subclasses, #55 Signed-off-by: Chris Malley --- js/common/view/GQViewProperties.js | 24 +++++++------------ .../view/FocusAndDirectrixViewProperties.js | 10 ++++++-- .../view/StandardFormViewProperties.js | 11 +++++++-- .../view/VertexFormViewProperties.js | 9 ++++++- 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/js/common/view/GQViewProperties.js b/js/common/view/GQViewProperties.js index ebf53fc0..addc1521 100644 --- a/js/common/view/GQViewProperties.js +++ b/js/common/view/GQViewProperties.js @@ -25,9 +25,8 @@ define( require => { options = _.extend( { equationForm: 'standard', // see GQConstants.EQUATION_FORMS graphContentsVisible: true, - equationsVisible: GQQueryParameters.checkAll, - coordinatesVisible: true, equationAccordionBoxExpanded: true, + equationsVisible: GQQueryParameters.checkAll, tandem: Tandem.required }, options ); @@ -43,23 +42,17 @@ define( require => { phetioDocumentation: 'whether the contents of the graph are visible' } ); - // @public - this.equationsVisibleProperty = new BooleanProperty( options.equationsVisible, { - tandem: options.tandem.createTandem( 'equationsVisibleProperty' ), - phetioDocumentation: 'whether equations are visible on the graphed curves' - } ); - - // @public - this.coordinatesVisibleProperty = new BooleanProperty( options.coordinatesVisible, { - tandem: options.tandem.createTandem( 'coordinatesVisibleProperty' ), - phetioDocumentation: 'whether coordinates are visible on points and manipulators' - } ); - // @public this.equationAccordionBoxExpandedProperty = new BooleanProperty( options.equationAccordionBoxExpanded, { tandem: options.tandem.createTandem( 'equationAccordionBoxExpandedProperty' ), phetioDocumentation: 'whether the equation accordion box is expanded' } ); + + // @public + this.equationsVisibleProperty = new BooleanProperty( options.equationsVisible, { + tandem: options.tandem.createTandem( 'equationsVisibleProperty' ), + phetioDocumentation: 'whether equations are visible on graphed curves' + } ); } /** @@ -67,9 +60,8 @@ define( require => { */ reset() { this.graphContentsVisibleProperty.reset(); - this.equationsVisibleProperty.reset(); - this.coordinatesVisibleProperty.reset(); this.equationAccordionBoxExpandedProperty.reset(); + this.equationsVisibleProperty.reset(); } } diff --git a/js/focusanddirectrix/view/FocusAndDirectrixViewProperties.js b/js/focusanddirectrix/view/FocusAndDirectrixViewProperties.js index eda8e63e..c08030fc 100644 --- a/js/focusanddirectrix/view/FocusAndDirectrixViewProperties.js +++ b/js/focusanddirectrix/view/FocusAndDirectrixViewProperties.js @@ -24,7 +24,6 @@ define( require => { options = _.extend( { equationForm: 'vertex', - coordinatesVisible: GQQueryParameters.checkAll, tandem: Tandem.required }, options ); @@ -51,7 +50,13 @@ define( require => { // @public whether an interactive point is visible on the quadratic this.pointOnParabolaVisibleProperty = new BooleanProperty( GQQueryParameters.checkAll, { tandem: options.tandem.createTandem( 'pointOnParabolaVisibleProperty' ), - phetioDocumentation: 'whether the interactive point on the quadratic is visible' + phetioDocumentation: 'whether the manipulator for the point on the parabola is visible' + } ); + + // @public + this.coordinatesVisibleProperty = new BooleanProperty( GQQueryParameters.checkAll, { + tandem: options.tandem.createTandem( 'coordinatesVisibleProperty' ), + phetioDocumentation: 'whether coordinates are visible on manipulators (vertex, focus, point on parabola)' } ); } @@ -65,6 +70,7 @@ define( require => { this.focusVisibleProperty.reset(); this.directrixVisibleProperty.reset(); this.pointOnParabolaVisibleProperty.reset(); + this.coordinatesVisibleProperty.reset(); } } diff --git a/js/standardform/view/StandardFormViewProperties.js b/js/standardform/view/StandardFormViewProperties.js index 91dfa44c..5894d4fe 100644 --- a/js/standardform/view/StandardFormViewProperties.js +++ b/js/standardform/view/StandardFormViewProperties.js @@ -31,7 +31,7 @@ define( require => { // @public this.vertexVisibleProperty = new BooleanProperty( GQQueryParameters.checkAll, { tandem: options.tandem.createTandem( 'vertexVisibleProperty' ), - phetioDocumentation: 'whether the vertex point is visible' + phetioDocumentation: 'whether the vertex is visible' } ); // @public @@ -43,7 +43,13 @@ define( require => { // @public this.rootsVisibleProperty = new BooleanProperty( GQQueryParameters.checkAll, { tandem: options.tandem.createTandem( 'rootsVisibleProperty' ), - phetioDocumentation: 'whether the real roots of the quadratic are visible' + phetioDocumentation: 'whether the roots of the quadratic are visible' + } ); + + // @public + this.coordinatesVisibleProperty = new BooleanProperty( true, { + tandem: options.tandem.createTandem( 'coordinatesVisibleProperty' ), + phetioDocumentation: 'whether coordinates are visible on the vertex and roots' } ); } @@ -56,6 +62,7 @@ define( require => { this.vertexVisibleProperty.reset(); this.axisOfSymmetryVisibleProperty.reset(); this.rootsVisibleProperty.reset(); + this.coordinatesVisibleProperty.reset(); } } diff --git a/js/vertexform/view/VertexFormViewProperties.js b/js/vertexform/view/VertexFormViewProperties.js index 7dfab614..1fdb61de 100644 --- a/js/vertexform/view/VertexFormViewProperties.js +++ b/js/vertexform/view/VertexFormViewProperties.js @@ -32,7 +32,7 @@ define( require => { // @public this.vertexVisibleProperty = new BooleanProperty( GQQueryParameters.checkAll, { tandem: options.tandem.createTandem( 'vertexVisibleProperty' ), - phetioDocumentation: 'whether the vertex manipulator is visible' + phetioDocumentation: 'whether the vertex is visible' } ); // @public @@ -40,6 +40,12 @@ define( require => { tandem: options.tandem.createTandem( 'axisOfSymmetryVisibleProperty' ), phetioDocumentation: 'whether the axis of symmetry is visible' } ); + + // @public + this.coordinatesVisibleProperty = new BooleanProperty( true, { + tandem: options.tandem.createTandem( 'coordinatesVisibleProperty' ), + phetioDocumentation: 'whether coordinates are visible on the vertex' + } ); } /** @@ -50,6 +56,7 @@ define( require => { super.reset(); this.vertexVisibleProperty.reset(); this.axisOfSymmetryVisibleProperty.reset(); + this.coordinatesVisibleProperty.reset(); } }