From 7956e6320d74527377606d3ebb8ce2a378320581 Mon Sep 17 00:00:00 2001 From: Martin Veillette Date: Wed, 21 Sep 2022 14:35:17 -0400 Subject: [PATCH] instrument curveNode (see #48) Signed-off-by: Martin Veillette --- js/common/view/CurveNode.ts | 3 ++- js/common/view/GraphNode.ts | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/js/common/view/CurveNode.ts b/js/common/view/CurveNode.ts index e3a8aa39..2ad3da5f 100644 --- a/js/common/view/CurveNode.ts +++ b/js/common/view/CurveNode.ts @@ -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'; @@ -28,7 +29,7 @@ type SelfOptions = { pathOptions?: PathOptions; }; -export type CurveNodeOptions = SelfOptions; //TODO nothing from NodeOptions for now, but eventually PickRequired +export type CurveNodeOptions = SelfOptions & PickRequired; export default class CurveNode extends Node { diff --git a/js/common/view/GraphNode.ts b/js/common/view/GraphNode.ts index e48865f6..ff3d152a 100644 --- a/js/common/view/GraphNode.ts +++ b/js/common/view/GraphNode.ts @@ -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', @@ -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',