Skip to content

Commit

Permalink
correct order of the arrow keys, see phetsims/friction#337
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Feb 3, 2023
1 parent daff436 commit 7961aef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/keyboard/help/KeyboardHelpIconFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,12 @@ export default class KeyboardHelpIconFactory {
spacing: DEFAULT_HORIZONTAL_KEY_SPACING
}, providedOptions );

// order of these icons matches movement with the WASD keys
const upArrowKeyNode = new ArrowKeyNode( 'up' );
const leftArrowKeyNode = new ArrowKeyNode( 'left' );
const rightArrowKeyNode = new ArrowKeyNode( 'right' );
const downArrowKeyNode = new ArrowKeyNode( 'down' );
const icon = KeyboardHelpIconFactory.iconRow( [ upArrowKeyNode, leftArrowKeyNode, rightArrowKeyNode, downArrowKeyNode ], options );
const rightArrowKeyNode = new ArrowKeyNode( 'right' );
const icon = KeyboardHelpIconFactory.iconRow( [ upArrowKeyNode, leftArrowKeyNode, downArrowKeyNode, rightArrowKeyNode ], options );
icon.disposeEmitter.addListener( () => {
upArrowKeyNode.dispose();
downArrowKeyNode.dispose();
Expand Down

0 comments on commit 7961aef

Please sign in to comment.