Skip to content

Commit

Permalink
fix order of guess and answer lines for point tools, #89
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Feb 5, 2019
1 parent 0d948a7 commit 223b18a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions js/linegame/model/GraphTheLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@ define( function( require ) {

/**
* Updates the collection of lines that are 'seen' by the point tools.
* Order is important here! See https://github.com/phetsims/graphing-lines/issues/89
* @override
* @protected
*/
updateGraphLines: function() {

this.graph.lines.clear();

// Add lines in the order that they would be rendered.
if ( this.answerVisible ) {
this.graph.lines.push( this.answer );
}

// Account for guesses that might be NotALine (not a valid line).
if ( this.guessProperty.get() instanceof Line ) {
this.graph.lines.push( this.guessProperty.get() );
}

if ( this.answerVisible ) {
this.graph.lines.push( this.answer );
}
}
} );
} );
4 changes: 2 additions & 2 deletions js/linegame/model/MakeTheEquation.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ define( function( require ) {

/**
* Updates the collection of lines that are 'seen' by the point tools.
* Order is important here! See https://github.com/phetsims/graphing-lines/issues/89
* @override
* @protected
*/
updateGraphLines: function() {
this.graph.lines.clear();
// add lines in the order that they would be rendered
this.graph.lines.push( this.answer );
if ( this.answerVisible ) {
this.graph.lines.push( this.guessProperty.get() );
}
this.graph.lines.push( this.answer );
}
} );
} );
Expand Down

1 comment on commit 223b18a

@pixelzoom
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.