Skip to content

Commit

Permalink
Hotkey management prototype, renamed KeyboardDragListener hotkeys set…
Browse files Browse the repository at this point in the history
…ter => setHotkeys(), see phetsims/scenery#1621
  • Loading branch information
jonathanolson committed Mar 28, 2024
1 parent 19889d1 commit 9f94df9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/view/ISLCRulerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class ISLCRulerNode extends InteractiveHighlighting( Node ) {
const rulerAlignWithObjectXOffset = modelViewTransform.viewToModelDeltaX( RULER_WIDTH ) / 2;

// register hotkeys
keyboardDragListener.hotkeys = [ {
keyboardDragListener.setHotkeys( [ {
keys: [ KeyboardUtils.KEY_J, KeyboardUtils.KEY_C ], // jump to center of object 1
callback: () => {
const x = getObject1Position();
Expand All @@ -328,7 +328,7 @@ class ISLCRulerNode extends InteractiveHighlighting( Node ) {

rulerAlerter.alertJumpHome();
}
} ];
} ] );


// @public - ruler node is never destroyed, no listener disposal necessary
Expand Down

0 comments on commit 9f94df9

Please sign in to comment.