Skip to content

Commit

Permalink
Instrument interactive components with Interactive Highlights, see ph…
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Oct 10, 2022
1 parent 1c78c54 commit 108b4a1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions js/common/view/OpticalObjectNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import { Node, NodeOptions } from '../../../../scenery/js/imports.js';
import { InteractiveHighlighting, Node, NodeOptions } from '../../../../scenery/js/imports.js';
import geometricOptics from '../../geometricOptics.js';
import CueingArrowsNode from './CueingArrowsNode.js';
import optionize, { EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
Expand All @@ -24,7 +24,7 @@ export type OpticalObjectNodeOptions = SelfOptions &
PickRequired<NodeOptions, 'tandem'> &
PickOptional<NodeOptions, 'visibleProperty'>;

export default class OpticalObjectNode extends Node {
export default class OpticalObjectNode extends InteractiveHighlighting( Node ) {

private readonly wasDraggedProperty: TProperty<boolean>;
protected readonly cueingArrowsNode: CueingArrowsNode;
Expand Down
4 changes: 2 additions & 2 deletions js/common/view/SecondPointNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Vector2Property from '../../../../dot/js/Vector2Property.js';
import { Shape } from '../../../../kite/js/imports.js';
import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js';
import ArrowNode from '../../../../scenery-phet/js/ArrowNode.js';
import { Circle, DragListener, FocusHighlightFromNode, KeyboardDragListener, KeyboardDragListenerOptions, Node, NodeOptions, VBox, VBoxOptions } from '../../../../scenery/js/imports.js';
import { Circle, DragListener, FocusHighlightFromNode, InteractiveHighlighting, KeyboardDragListener, KeyboardDragListenerOptions, Node, NodeOptions, VBox, VBoxOptions } from '../../../../scenery/js/imports.js';
import geometricOptics from '../../geometricOptics.js';
import GOColors from '../GOColors.js';
import SecondPoint from '../model/SecondPoint.js';
Expand All @@ -26,7 +26,7 @@ type SelfOptions = EmptySelfOptions;
type SecondPointNodeOptions = SelfOptions &
PickRequired<NodeOptions, 'visibleProperty' | 'tandem' | 'phetioDocumentation'>;

export default class SecondPointNode extends Node {
export default class SecondPointNode extends InteractiveHighlighting( Node ) {

/**
* @param secondPoint - model element
Expand Down
4 changes: 2 additions & 2 deletions js/common/view/tools/GOToolIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import TReadOnlyProperty from '../../../../../axon/js/TReadOnlyProperty.js';
import Vector2 from '../../../../../dot/js/Vector2.js';
import optionize from '../../../../../phet-core/js/optionize.js';
import ModelViewTransform2 from '../../../../../phetcommon/js/view/ModelViewTransform2.js';
import { DragListener, Node, NodeOptions, PressListenerEvent } from '../../../../../scenery/js/imports.js';
import { DragListener, InteractiveHighlighting, Node, NodeOptions, PressListenerEvent } from '../../../../../scenery/js/imports.js';
import geometricOptics from '../../../geometricOptics.js';
import GOTool from '../../model/tools/GOTool.js';
import GOToolNode from './GOToolNode.js';
Expand All @@ -25,7 +25,7 @@ type SelfOptions = {

export type GOToolIconOptions = SelfOptions;

export default abstract class GOToolIcon extends Node {
export default abstract class GOToolIcon extends InteractiveHighlighting( Node ) {

/**
* @param contentNode - the icon's content, what it looks like
Expand Down
4 changes: 2 additions & 2 deletions js/common/view/tools/GOToolNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import DerivedProperty from '../../../../../axon/js/DerivedProperty.js';
import Vector2 from '../../../../../dot/js/Vector2.js';
import optionize from '../../../../../phet-core/js/optionize.js';
import PickRequired from '../../../../../phet-core/js/types/PickRequired.js';
import { DragListener, IndexedNodeIO, Node, NodeOptions, PressListenerEvent } from '../../../../../scenery/js/imports.js';
import { DragListener, IndexedNodeIO, InteractiveHighlighting, Node, NodeOptions, PressListenerEvent } from '../../../../../scenery/js/imports.js';
import GOTool from '../../model/tools/GOTool.js';
import ToolJumpPoint from '../../model/tools/ToolJumpPoint.js';
import GOToolboxNode from './GOToolboxNode.js';
Expand All @@ -25,7 +25,7 @@ type SelfOptions = {

export type GOToolNodeOptions = SelfOptions & PickRequired<Node, 'tandem'> & PickOptional<Node, 'rotation'>;

export default abstract class GOToolNode extends Node {
export default abstract class GOToolNode extends InteractiveHighlighting( Node ) {

// the icon associated with this tool, as it appears in the toolbox
public abstract icon: Node;
Expand Down

0 comments on commit 108b4a1

Please sign in to comment.