Skip to content

Commit

Permalink
instrument curveNode (see #48)
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Veillette <[email protected]>
  • Loading branch information
veillette committed Sep 21, 2022
1 parent ac69792 commit 7956e63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion js/common/view/CurveNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import { Shape } from '../../../../kite/js/imports.js';
import optionize from '../../../../phet-core/js/optionize.js';
import PickRequired from '../../../../phet-core/js/types/PickRequired.js';
import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js';
import { Circle, Node, NodeOptions, Path, PathOptions } from '../../../../scenery/js/imports.js';
import calculusGrapher from '../../calculusGrapher.js';
Expand All @@ -28,7 +29,7 @@ type SelfOptions = {
pathOptions?: PathOptions;
};

export type CurveNodeOptions = SelfOptions; //TODO nothing from NodeOptions for now, but eventually PickRequired<NodeOptions, 'tandem'>
export type CurveNodeOptions = SelfOptions & PickRequired<NodeOptions, 'tandem'>;

export default class CurveNode extends Node {

Expand Down
6 changes: 4 additions & 2 deletions js/common/view/GraphNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export default class GraphNode extends Node {
this.curveNode = new OriginalCurveNode( curve, new Property( modelViewTransform ), {
pathOptions: {
stroke: 'blue'
}
},
tandem: options.tandem.createTandem( 'originalCurveNode' )
} );
chartRectangle = new ChartRectangle( chartTransform, {
fill: 'white',
Expand All @@ -92,7 +93,8 @@ export default class GraphNode extends Node {
this.curveNode = new CurveNode( curve, new Property( modelViewTransform ), {
pathOptions: {
stroke: 'green'
}
},
tandem: options.tandem.createTandem( 'curveNode' )
} );
chartRectangle = new ChartRectangle( chartTransform, {
fill: 'white',
Expand Down

0 comments on commit 7956e63

Please sign in to comment.