Skip to content

Commit

Permalink
added "none" as a possible return value of getCoordinateDisplaySystem…
Browse files Browse the repository at this point in the history
…, added handling of none value
  • Loading branch information
aw539 committed Aug 31, 2024
1 parent 9a920d3 commit 3ca636a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Goban/CanvasRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2822,6 +2822,8 @@ export class GobanCanvas extends Goban implements GobanCanvasInterface {
place("" + (c + 1), x, y);
}
break;
case "none":
break;
}
};

Expand Down Expand Up @@ -2878,6 +2880,8 @@ export class GobanCanvas extends Goban implements GobanCanvasInterface {
v_place(chinese_japanese_numbers[c], x, y);
}
break;
case "none":
break;
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/Goban/InteractiveBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ export abstract class GobanInteractive extends GobanBase {
return ret;
}

protected getCoordinateDisplaySystem(): "A1" | "1-1" {
protected getCoordinateDisplaySystem(): "A1" | "1-1" | "none" {
if (callbacks.getCoordinateDisplaySystem) {
return callbacks.getCoordinateDisplaySystem();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Goban/callbacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { GobanSelectedThemes } from "./Goban";

export interface GobanCallbacks {
defaultConfig?: () => any;
getCoordinateDisplaySystem?: () => "A1" | "1-1";
getCoordinateDisplaySystem?: () => "A1" | "1-1" | "none";
isAnalysisDisabled?: (goban: GobanBase, perGameSettingAppliesToNonPlayers: boolean) => boolean;

getClockDrift?: () => number;
Expand Down

0 comments on commit 3ca636a

Please sign in to comment.