Skip to content

Commit

Permalink
instrument buttons in control Panel (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 3c9efd3 commit a79e2be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion js/common/view/CalculusGrapherControlPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<PanelOptions, 'tandem'>;

export default class CalculusGrapherControlPanel extends Panel {

Expand Down
4 changes: 3 additions & 1 deletion js/common/view/CalculusGrapherScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit a79e2be

Please sign in to comment.