From a79e2beb9da3e4242421032bad5c59de66f5b6c1 Mon Sep 17 00:00:00 2001 From: Martin Veillette Date: Wed, 21 Sep 2022 13:45:31 -0400 Subject: [PATCH] instrument buttons in control Panel (see #48) Signed-off-by: Martin Veillette --- js/common/view/CalculusGrapherControlPanel.ts | 3 ++- js/common/view/CalculusGrapherScreenView.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/common/view/CalculusGrapherControlPanel.ts b/js/common/view/CalculusGrapherControlPanel.ts index bd4e64eb..27d36cdc 100644 --- a/js/common/view/CalculusGrapherControlPanel.ts +++ b/js/common/view/CalculusGrapherControlPanel.ts @@ -17,12 +17,13 @@ import CalculusGrapherColors from '../CalculusGrapherColors.js'; import CurveManipulationMode from '../model/CurveManipulationMode.js'; import OriginalCurve from '../model/OriginalCurve.js'; import optionize from '../../../../phet-core/js/optionize.js'; +import PickRequired from '../../../../phet-core/js/types/PickRequired.js'; type SelfOptions = { contentSpacing?: number; }; -type CalculusGrapherControlPanelOptions = SelfOptions & PanelOptions; +type CalculusGrapherControlPanelOptions = SelfOptions & PickRequired; export default class CalculusGrapherControlPanel extends Panel { diff --git a/js/common/view/CalculusGrapherScreenView.ts b/js/common/view/CalculusGrapherScreenView.ts index 7108dff0..af119fb6 100644 --- a/js/common/view/CalculusGrapherScreenView.ts +++ b/js/common/view/CalculusGrapherScreenView.ts @@ -45,7 +45,9 @@ export default class CalculusGrapherScreenView extends ScreenView { // derivative.centerTop = graphNode.centerBottom.addXY( 0, 10 ); // this.addChild( derivative ); - const controlPanel = new CalculusGrapherControlPanel( model.originalCurve ); + const controlPanel = new CalculusGrapherControlPanel( model.originalCurve, { + tandem: options.tandem.createTandem( 'calculusGrapherControlPanel' ) + } ); controlPanel.rightCenter = this.layoutBounds.rightCenter; this.addChild( controlPanel ); }