diff --git a/js/common/GQColors.js b/js/common/GQColors.js index aa7b5f34..628b5fd4 100644 --- a/js/common/GQColors.js +++ b/js/common/GQColors.js @@ -3,7 +3,6 @@ /** * Colors used throughout this project. * - * @author Chris Malley (PixelZoom, Inc.) * @author Andrea Lin */ define( function( require ) { @@ -37,7 +36,5 @@ define( function( require ) { } }; - graphingQuadratics.register( 'GQColors', GQColors ); - - return GQColors; + return graphingQuadratics.register( 'GQColors', GQColors ); } ); diff --git a/js/common/GQConstants.js b/js/common/GQConstants.js index 338d926a..0d28a793 100644 --- a/js/common/GQConstants.js +++ b/js/common/GQConstants.js @@ -3,7 +3,7 @@ /** * Constants that are global to this sim. * - * @author Chris Malley (PixelZoom, Inc.) + * @author Andrea Lin */ define( function( require ) { 'use strict'; @@ -24,7 +24,5 @@ define( function( require ) { POINT_RADIUS: 0.25 }; - graphingQuadratics.register( 'GQConstants', GQConstants ); - - return GQConstants; + return graphingQuadratics.register( 'GQConstants', GQConstants ); } ); diff --git a/js/common/GQFont.js b/js/common/GQFont.js index 3f0cb4d2..0cc178b7 100644 --- a/js/common/GQFont.js +++ b/js/common/GQFont.js @@ -3,6 +3,7 @@ /** * Font used throughout this simulation. * + * @author Andrea Lin * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { diff --git a/js/common/model/GQModel.js b/js/common/model/GQModel.js index 5e279767..11c789ec 100644 --- a/js/common/model/GQModel.js +++ b/js/common/model/GQModel.js @@ -3,8 +3,8 @@ /** * Common model (base type) for Graphing Quadratics. * - * @author Chris Malley (PixelZoom, Inc.) * @author Andrea Lin + * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { 'use strict'; diff --git a/js/common/view/EquationControls.js b/js/common/view/EquationControls.js index 2d885b46..2a4e88d9 100644 --- a/js/common/view/EquationControls.js +++ b/js/common/view/EquationControls.js @@ -4,8 +4,8 @@ /** * Control panel for interactive-equation. * - * @author Chris Malley (PixelZoom, Inc.) * @author Andrea Lin + * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { 'use strict'; @@ -44,6 +44,8 @@ define( function( require ) { constructor( titleNode, interactiveEquationNode, saveFunction, eraseFunction, options ) { options = _.extend( { + + // superclass options fill: GQColors.CONTROL_PANEL_BACKGROUND, xMargin: 10, yMargin: 10 diff --git a/js/common/view/GQSceneNode.js b/js/common/view/GQSceneNode.js index 71ec9cd9..d3f7b76d 100644 --- a/js/common/view/GQSceneNode.js +++ b/js/common/view/GQSceneNode.js @@ -4,8 +4,8 @@ * Common view for a scene. Base type for each of the two scenes on the standard form screen, as well as the single * scene in the vertex form screen. * - * @author Chris Malley (PixelZoom, Inc.) * @author Andrea Lin + * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { 'use strict'; diff --git a/js/common/view/GQScreenView.js b/js/common/view/GQScreenView.js index 2972ae7c..82f2e567 100644 --- a/js/common/view/GQScreenView.js +++ b/js/common/view/GQScreenView.js @@ -3,8 +3,8 @@ /** * Common view for a screen. * - * @author Chris Malley (PixelZoom, Inc.) * @author Andrea Lin + * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { 'use strict'; @@ -19,7 +19,7 @@ define( function( require ) { /** * @param {GQModel} model - * @param {LineFormViewProperties[]} viewPropertiesArray - an array that holds elements of type LineFormViewProperties + * @param {GQViewProperties[]} viewPropertiesArray - view Properties for each scene */ constructor( model, viewPropertiesArray ) { diff --git a/js/common/view/GQViewProperties.js b/js/common/view/GQViewProperties.js index 4e50ea1e..5425bdba 100644 --- a/js/common/view/GQViewProperties.js +++ b/js/common/view/GQViewProperties.js @@ -49,7 +49,10 @@ define( function( require ) { return inherit( LineFormsViewProperties, GQViewProperties, { - // @public + /** + * @public + * @override + */ reset: function() { LineFormsViewProperties.prototype.reset.call( this ); this.vertexVisibleProperty.reset(); diff --git a/js/common/view/GraphAndLinesNode.js b/js/common/view/GraphAndLinesNode.js index 19f6af88..6b36d14b 100644 --- a/js/common/view/GraphAndLinesNode.js +++ b/js/common/view/GraphAndLinesNode.js @@ -1,11 +1,12 @@ // Copyright 2014-2018, University of Colorado Boulder +//TODO consider a better name for this class /** * Common view for a scene. Base type for each of the two scenes on the standard form screen, as well as the single * scene in the vertex form screen. * - * @author Chris Malley (PixelZoom, Inc.) * @author Andrea Lin + * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { 'use strict'; @@ -27,12 +28,7 @@ define( function( require ) { * @param {GQViewProperties} viewProperties * @param {Object} [options] */ - constructor( - model, - layoutBounds, - viewProperties, - options - ) { + constructor( model, layoutBounds, viewProperties, options ) { options = _.extend( { hasVertexManipulator: false // only vertex scene has vertex manipulator diff --git a/js/common/view/PlottedPointNode.js b/js/common/view/PlottedPointNode.js index 1492c1c9..6b164a23 100644 --- a/js/common/view/PlottedPointNode.js +++ b/js/common/view/PlottedPointNode.js @@ -22,11 +22,15 @@ define( function( require ) { constructor( radius, color, options ) { options = _.extend( { + + // superclass options fill: color, stroke: color, lineWidth: 1 }, options ); + //TODO assert that options fill and stroke are undefined, then assign constructor args + super( radius, options ); } } diff --git a/js/common/view/PointToolNode.js b/js/common/view/PointToolNode.js index 7939f1ad..3ac8580d 100644 --- a/js/common/view/PointToolNode.js +++ b/js/common/view/PointToolNode.js @@ -5,8 +5,8 @@ * Tool that displays the (x,y) coordinates of a grid-point on the graph. * Origin is at the tip of the tool (bottom center.) * - * @author Chris Malley (PixelZoom, Inc.) * @author Andrea Lin + * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { 'use strict'; diff --git a/js/common/view/SliderUnit.js b/js/common/view/SliderUnit.js index 9c938dfd..e0748ef8 100644 --- a/js/common/view/SliderUnit.js +++ b/js/common/view/SliderUnit.js @@ -30,17 +30,22 @@ define( function( require ) { * @param {string} string * @param {NumberProperty} property * @param {number} decimalPlaces - * @param {Object} [options] for slider node. + * @param {Object} [options] */ constructor( string, property, decimalPlaces, options ) { options = _.extend( { - align: 'center', + centralTick: true, + + // HSlider options trackFill: 'black', trackSize: new Dimension2( 160, 1 ), thumbSize: new Dimension2( 15, 25 ), - thumbTouchAreaYDilation: 8 + thumbTouchAreaYDilation: 8, + + // superclass options + align: 'center' }, options ); super( options ); diff --git a/js/common/view/VertexManipulator.js b/js/common/view/VertexManipulator.js index e4a92751..02554977 100644 --- a/js/common/view/VertexManipulator.js +++ b/js/common/view/VertexManipulator.js @@ -4,8 +4,8 @@ /** * Drag handler for the vertex. * - * @author Chris Malley (PixelZoom, Inc.) * @author Andrea Lin + * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { 'use strict'; diff --git a/js/standardform/StandardFormScreen.js b/js/standardform/StandardFormScreen.js index a9acb841..51877186 100644 --- a/js/standardform/StandardFormScreen.js +++ b/js/standardform/StandardFormScreen.js @@ -3,7 +3,7 @@ /** * The 'Standard Form' screen. * - * @author Chris Malley (PixelZoom, Inc.) + * @author Andrea Lin */ define( function( require ) { 'use strict'; @@ -24,6 +24,8 @@ define( function( require ) { constructor() { const options = { + + // superclass options name: screenStandardFormString, backgroundColorProperty: new Property( GQColors.SCREEN_BACKGROUND ) //TODO add homeScreenIcon diff --git a/js/standardform/view/DecimalsGraphControls.js b/js/standardform/view/DecimalsGraphControls.js index bea1c039..c00ac31f 100644 --- a/js/standardform/view/DecimalsGraphControls.js +++ b/js/standardform/view/DecimalsGraphControls.js @@ -46,6 +46,8 @@ define( function( require ) { ) { options = _.extend( { + + // superclass options fill: GQColors.CONTROL_PANEL_BACKGROUND, xMargin: 20, yMargin: 15 diff --git a/js/standardform/view/DecimalsInteractiveEquationNode.js b/js/standardform/view/DecimalsInteractiveEquationNode.js index 880dc0c1..e58176e7 100644 --- a/js/standardform/view/DecimalsInteractiveEquationNode.js +++ b/js/standardform/view/DecimalsInteractiveEquationNode.js @@ -43,6 +43,7 @@ define( function( require ) { class DecimalsInteractiveEquationNode extends Node { + //TODO options not used /** * @param {Property.} quadraticProperty * @param {Object} [options] diff --git a/js/standardform/view/IntegersGraphControls.js b/js/standardform/view/IntegersGraphControls.js index 06b1dcfb..4af5eb9f 100644 --- a/js/standardform/view/IntegersGraphControls.js +++ b/js/standardform/view/IntegersGraphControls.js @@ -32,14 +32,11 @@ define( function( require ) { * @param {BooleanProperty} rootsVisibleProperty * @param {Object} [options] */ - constructor( - vertexVisibleProperty, - axisOfSymmetryVisibleProperty, - rootsVisibleProperty, - options - ) { + constructor( vertexVisibleProperty, axisOfSymmetryVisibleProperty, rootsVisibleProperty, options ) { options = _.extend( { + + // superclass options fill: GQColors.CONTROL_PANEL_BACKGROUND, xMargin: 20, yMargin: 15 diff --git a/js/standardform/view/IntegersInteractiveEquationNode.js b/js/standardform/view/IntegersInteractiveEquationNode.js index 75d86b0c..d439e20f 100644 --- a/js/standardform/view/IntegersInteractiveEquationNode.js +++ b/js/standardform/view/IntegersInteractiveEquationNode.js @@ -36,6 +36,7 @@ define( function( require ) { class IntegersInteractiveEquationNode extends Node { + //TODO option not used /** * @param {Property.} quadraticProperty * @param {Object} [options] diff --git a/js/standardform/view/SceneControl.js b/js/standardform/view/SceneControl.js index 24be23ff..03d4ff09 100644 --- a/js/standardform/view/SceneControl.js +++ b/js/standardform/view/SceneControl.js @@ -22,6 +22,8 @@ define( function( require ) { constructor( selectedSceneProperty, scenes, options ) { options = _.extend( { + + // superclass options orientation: 'horizontal', spacing: 20, baseColor: 'white', @@ -31,7 +33,9 @@ define( function( require ) { }, options ); // touchArea optimized for spacing + assert && assert( options.touchAreaXDilation === undefined, 'SceneControl sets touchAreaXDilation' ); options.touchAreaXDilation = ( options.spacing / 2 ) - 1; + assert && assert( options.touchAreaYDilation === undefined, 'SceneControl sets touchAreaYDilation' ); options.touchAreaYDilation = 5; const content = []; diff --git a/js/standardform/view/StandardFormEquationNode.js b/js/standardform/view/StandardFormEquationNode.js index 03f2ce1b..e8ca49f0 100644 --- a/js/standardform/view/StandardFormEquationNode.js +++ b/js/standardform/view/StandardFormEquationNode.js @@ -32,6 +32,8 @@ define( function( require ) { constructor( options ) { options = _.extend( { + + // superclass options font: GQFont.MATH_SYMBOL_FONT } ); diff --git a/js/vertexform/VertexFormScreen.js b/js/vertexform/VertexFormScreen.js index 5f602d85..8d803d04 100644 --- a/js/vertexform/VertexFormScreen.js +++ b/js/vertexform/VertexFormScreen.js @@ -24,6 +24,8 @@ define( function( require ) { constructor() { const options = { + + // superclass options name: screenVertexFormString, backgroundColorProperty: new Property( GQColors.SCREEN_BACKGROUND ) }; diff --git a/js/vertexform/model/VertexFormModel.js b/js/vertexform/model/VertexFormModel.js index 6e9e5f77..c5af8e74 100644 --- a/js/vertexform/model/VertexFormModel.js +++ b/js/vertexform/model/VertexFormModel.js @@ -3,7 +3,6 @@ /** * Model for the 'Vertex Form' screen. * - * @author Chris Malley (PixelZoom, Inc.) * @author Andrea Lin */ define( function( require ) { diff --git a/js/vertexform/view/VertexFormEquationNode.js b/js/vertexform/view/VertexFormEquationNode.js index 99cf4cde..3edf2c1c 100644 --- a/js/vertexform/view/VertexFormEquationNode.js +++ b/js/vertexform/view/VertexFormEquationNode.js @@ -31,6 +31,8 @@ define( function( require ) { constructor( options ) { options = _.extend( { + + // superclass options font: GQFont.MATH_SYMBOL_FONT } ); diff --git a/js/vertexform/view/VertexFormScreenView.js b/js/vertexform/view/VertexFormScreenView.js index ec09e133..d22f1b4f 100644 --- a/js/vertexform/view/VertexFormScreenView.js +++ b/js/vertexform/view/VertexFormScreenView.js @@ -3,7 +3,7 @@ /** * View for the 'Vertex Form' screen. * - * @author Chris Malley (PixelZoom, Inc.) + * @author Andrea Lin */ define( function( require ) { 'use strict'; diff --git a/js/vertexform/view/VertexGraphControls.js b/js/vertexform/view/VertexGraphControls.js index 9e9eca75..702a1ae3 100644 --- a/js/vertexform/view/VertexGraphControls.js +++ b/js/vertexform/view/VertexGraphControls.js @@ -33,6 +33,8 @@ define( function( require ) { constructor( axisOfSymmetryVisibleProperty, directrixVisibleProperty, options ) { options = _.extend( { + + // superclass options fill: GQColors.CONTROL_PANEL_BACKGROUND, xMargin: 20, yMargin: 15 diff --git a/js/vertexform/view/VertexInteractiveEquationNode.js b/js/vertexform/view/VertexInteractiveEquationNode.js index 06acdd4f..77cd5167 100644 --- a/js/vertexform/view/VertexInteractiveEquationNode.js +++ b/js/vertexform/view/VertexInteractiveEquationNode.js @@ -1,7 +1,7 @@ // Copyright 2018, University of Colorado Boulder /** - * Renderer for standard form equation with integer cofficients that can be changed. + * Renderer for standard form equation with integer coefficients that can be changed. * Form is y = ax^2 + bx + c, where a, b, and c can be changed with number pickers * * @author Andrea Lin @@ -35,6 +35,7 @@ define( function( require ) { class VertexInteractiveEquationNode extends Node { + //TODO options not used /** * @param {Property.} quadraticProperty * @param {Object} [options]