From 32bb3a2748bd6ad16a3ec142df14d37c7cb12742 Mon Sep 17 00:00:00 2001 From: Chris Malley Date: Sun, 23 Apr 2017 13:59:55 -0600 Subject: [PATCH] add TODO items for #78 --- js/common/view/PointToolNode.js | 1 + js/linegame/view/ChallengeGraphNode.js | 1 + js/linegame/view/ChallengeNode.js | 1 + js/linegame/view/GraphTheLineNode.js | 3 ++- js/linegame/view/MakeTheEquationNode.js | 2 ++ js/pointslope/view/PointSlopeEquationNode.js | 1 + js/slope/view/SlopeEquationNode.js | 1 + js/slopeintercept/view/SlopeInterceptEquationNode.js | 1 + 8 files changed, 10 insertions(+), 1 deletion(-) diff --git a/js/common/view/PointToolNode.js b/js/common/view/PointToolNode.js index 9cedeb07..1baa5c0f 100644 --- a/js/common/view/PointToolNode.js +++ b/js/common/view/PointToolNode.js @@ -1,5 +1,6 @@ // Copyright 2013-2015, University of Colorado Boulder +//TOOD #78 implement dispose /** * Tool that displays the (x,y) coordinates of a grid-point on the graph. * Origin is at the tip of the tool (bottom center.) diff --git a/js/linegame/view/ChallengeGraphNode.js b/js/linegame/view/ChallengeGraphNode.js index 014fdd08..571999f2 100644 --- a/js/linegame/view/ChallengeGraphNode.js +++ b/js/linegame/view/ChallengeGraphNode.js @@ -1,5 +1,6 @@ // Copyright 2013-2015, University of Colorado Boulder +//TODO implement dispose for this node and its subtypes /** * Base type for graph nodes in game challenges. * Renders the answer line, guess line, and slope tool. diff --git a/js/linegame/view/ChallengeNode.js b/js/linegame/view/ChallengeNode.js index 9617c3fb..047bfd1c 100644 --- a/js/linegame/view/ChallengeNode.js +++ b/js/linegame/view/ChallengeNode.js @@ -77,6 +77,7 @@ define( function( require ) { maxWidth: 400 // determined empirically } ); + //TODO #78 dispose of PointToolNode // point tools var linesVisibleProperty = new Property( true ); var pointToolNode1 = new PointToolNode( challenge.pointTool1, challenge.modelViewTransform, challenge.graph, linesVisibleProperty, { scale: LineGameConstants.POINT_TOOL_SCALE } ); diff --git a/js/linegame/view/GraphTheLineNode.js b/js/linegame/view/GraphTheLineNode.js index d8280520..e7b72e15 100644 --- a/js/linegame/view/GraphTheLineNode.js +++ b/js/linegame/view/GraphTheLineNode.js @@ -62,7 +62,6 @@ define( function( require ) { slopeUndefinedVisible: false } ) ); - // Guess equation var guessLineProperty = new Property( Line.Y_EQUALS_X_LINE ); // start with any non-null line this.equationNode = ChallengeNode.createEquationNode( guessLineProperty, { equationForm: challenge.equationForm, @@ -159,6 +158,8 @@ define( function( require ) { // @private called by dispose this.disposeGraphTheLineNode = function() { + //TODO #78 this.equationNode.dispose(); + //TODO #78 this.graphNode.dispose(); challenge.guessProperty.unlink( guessObserver ); model.playStateProperty.unlink( playStateObserver ); }; diff --git a/js/linegame/view/MakeTheEquationNode.js b/js/linegame/view/MakeTheEquationNode.js index 99558d0a..ea97ac9f 100644 --- a/js/linegame/view/MakeTheEquationNode.js +++ b/js/linegame/view/MakeTheEquationNode.js @@ -59,6 +59,7 @@ define( function( require ) { } ) ); answerBoxNode.visible = false; + //TODO #78 dispose of the EquationNode returned by createInteractiveEquationNode // Guess var guessBoxNode = new EquationBoxNode( yourEquationString, challenge.guessProperty.get().color, boxSize, createInteractiveEquationNode( challenge.equationForm, challenge.manipulationMode, challenge.guessProperty, challenge.graph, @@ -148,6 +149,7 @@ define( function( require ) { // @private called by dispose this.disposeMakeTheEquationNode = function() { + //TODO #78 graphNode.dispose(); challenge.guessProperty.unlink( guessObserver ); model.playStateProperty.unlink( playStateObserver ); }; diff --git a/js/pointslope/view/PointSlopeEquationNode.js b/js/pointslope/view/PointSlopeEquationNode.js index 29577202..8619b4ad 100644 --- a/js/pointslope/view/PointSlopeEquationNode.js +++ b/js/pointslope/view/PointSlopeEquationNode.js @@ -1,5 +1,6 @@ // Copyright 2013-2017, University of Colorado Boulder +//TODO #78 implement dispose /** * Renderer for point-slope equations, with optional interactivity of point and slope. * General point-slope form is: (y - y1) = m(x - x1) diff --git a/js/slope/view/SlopeEquationNode.js b/js/slope/view/SlopeEquationNode.js index 2560cb3d..279e9a12 100644 --- a/js/slope/view/SlopeEquationNode.js +++ b/js/slope/view/SlopeEquationNode.js @@ -1,5 +1,6 @@ // Copyright 2013-2017, University of Colorado Boulder +//TODO #78 implement dispose /** * Renderer for slope equations. * General form is m = (y2 - y1) / (x2 - x1) = rise/run diff --git a/js/slopeintercept/view/SlopeInterceptEquationNode.js b/js/slopeintercept/view/SlopeInterceptEquationNode.js index 93de6aba..a28f63da 100644 --- a/js/slopeintercept/view/SlopeInterceptEquationNode.js +++ b/js/slopeintercept/view/SlopeInterceptEquationNode.js @@ -1,5 +1,6 @@ // Copyright 2013-2017, University of Colorado Boulder +//TODO #78 implement dispose /** * Renderer for slope-intercept equations, with optional interactivity of slope and intercept. * General slope-intercept form is: y = mx + b