Skip to content

Commit

Permalink
rename GQGraphNode #7
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
  • Loading branch information
pixelzoom committed Aug 7, 2018
1 parent 94159e2 commit 4c25692
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ define( function( require ) {
const Shape = require( 'KITE/Shape' );
const VertexManipulator = require( 'GRAPHING_QUADRATICS/common/view/VertexManipulator' );

class GraphAndLinesNode extends Node {
class GQGraphNode extends Node {

/**
* @param {GQScene} model
Expand Down Expand Up @@ -100,5 +100,5 @@ define( function( require ) {
}
}

return graphingQuadratics.register( 'GraphAndLinesNode', GraphAndLinesNode );
return graphingQuadratics.register( 'GQGraphNode', GQGraphNode );
} );
10 changes: 5 additions & 5 deletions js/common/view/GQSceneNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define( function( require ) {
// modules
const EquationAccordionBox = require( 'GRAPHING_QUADRATICS/common/view/EquationAccordionBox' );
const GQConstants = require( 'GRAPHING_QUADRATICS/common/GQConstants' );
const GraphAndLinesNode = require( 'GRAPHING_QUADRATICS/common/view/GraphAndLinesNode' );
const GQGraphNode = require( 'GRAPHING_QUADRATICS/common/view/GQGraphNode' );
const graphingQuadratics = require( 'GRAPHING_QUADRATICS/graphingQuadratics' );
const Node = require( 'SCENERY/nodes/Node' );
const PointToolNode = require( 'GRAPHING_QUADRATICS/common/view/PointToolNode' );
Expand Down Expand Up @@ -61,7 +61,7 @@ define( function( require ) {
pointToolParent.addChild( pointTool2 );

// The graph and everything on it -- position is determined by the model!
const graphAndLinesNode = new GraphAndLinesNode( scene, layoutBounds, viewProperties, {
const graphNode = new GQGraphNode( scene, layoutBounds, viewProperties, {
hasVertexManipulator: options.hasVertexManipulator
} );

Expand All @@ -88,15 +88,15 @@ define( function( require ) {

// rendering order
this.addChild( controlsParent );
this.addChild( graphAndLinesNode );
this.addChild( graphNode );
this.addChild( pointToolParent );

// Constrain control panels to amount of horizontal space available.
const availableControlPanelWidth = layoutBounds.width - graphAndLinesNode.right - ( 2 * GQConstants.SCREEN_VIEW_X_MARGIN );
const availableControlPanelWidth = layoutBounds.width - graphNode.right - ( 2 * GQConstants.SCREEN_VIEW_X_MARGIN );
controlsParent.maxWidth = 0.9 * availableControlPanelWidth;

// Horizontally center controls in the space to the right of the graph.
controlsParent.centerX = graphAndLinesNode.right + GQConstants.SCREEN_VIEW_X_MARGIN + ( availableControlPanelWidth / 2 );
controlsParent.centerX = graphNode.right + GQConstants.SCREEN_VIEW_X_MARGIN + ( availableControlPanelWidth / 2 );
controlsParent.top = GQConstants.SCREEN_VIEW_Y_MARGIN;

// @public
Expand Down

0 comments on commit 4c25692

Please sign in to comment.