Skip to content

Commit

Permalink
Give the ply limit alert on all types of analysis boards, not just st…
Browse files Browse the repository at this point in the history
…udy ones.
  • Loading branch information
johndoknjas committed Dec 29, 2024
1 parent ce815f8 commit 86fe0a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ui/analyse/src/ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,8 @@ export default class AnalyseCtrl {
}

onPremoveSet = () => {
if (this.study) this.study.onPremoveSet();
if (this.node.dests === '') alert('Too many moves for a lichess board.');
else if (this.study) this.study.onPremoveSet();
};

addNode(node: Tree.Node, path: Tree.Path) {
Expand Down
5 changes: 1 addition & 4 deletions ui/analyse/src/study/studyCtrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,7 @@ export default class StudyCtrl {
};
explorerGame = (gameId: string, insert: boolean) =>
this.makeChange('explorerGame', this.withPosition({ gameId, insert }));
onPremoveSet = () => {
if (this.currentNode().dests === '') alert('Too many moves for a lichess board.');
else this.gamebookPlay?.onPremoveSet();
};
onPremoveSet = () => this.gamebookPlay?.onPremoveSet();
baseUrl = () => {
const current = location.href;
const studyIdOffset = current.indexOf(`/${this.data.id}`);
Expand Down

0 comments on commit 86fe0a6

Please sign in to comment.