Skip to content

Commit

Permalink
Move setOrientation call within if stmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoknjas committed Feb 1, 2025
1 parent 2062334 commit 3364478
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/editor/src/ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ export default class EditorCtrl {
cfg.endgamePositions.forEach(p => (p.epd = p.fen.split(' ').splice(0, 4).join(' ')));

site.mousetrap.bind('f', () => {
if (this.chessground) this.chessground.toggleOrientation();
if (this.options.orientation) this.setOrientation(opposite(this.options.orientation));
if (this.chessground) {
this.chessground.toggleOrientation();
if (this.options.orientation) this.setOrientation(opposite(this.options.orientation));
}
this.onChange();
});

Expand Down

0 comments on commit 3364478

Please sign in to comment.