reload personal opening explorer data on board flip
parent
88ab7ac864
commit
7eadfc9862
|
@ -226,6 +226,7 @@ export default class AnalyseCtrl {
|
|||
this.retro = makeRetro(this, this.bottomColor());
|
||||
}
|
||||
if (this.practice) this.restartPractice();
|
||||
this.explorer.onFlip();
|
||||
this.redraw();
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export function controller(game: Game, onClose: () => void, trans: Trans, redraw
|
|||
if (variant === 'standard') available.unshift('masters');
|
||||
|
||||
const data: ExplorerConfigData = {
|
||||
open: prop(true),
|
||||
open: prop(false),
|
||||
db: {
|
||||
available,
|
||||
selected:
|
||||
|
|
|
@ -173,16 +173,15 @@ export default function (root: AnalyseCtrl, opts: ExplorerOpts, allow: boolean):
|
|||
}
|
||||
},
|
||||
setHovering(fen, uci) {
|
||||
hovering(
|
||||
uci
|
||||
? {
|
||||
fen,
|
||||
uci,
|
||||
}
|
||||
: null
|
||||
);
|
||||
hovering(uci ? { fen, uci } : null);
|
||||
root.setAutoShapes();
|
||||
},
|
||||
onFlip() {
|
||||
if (config.data.db.selected() == 'player') {
|
||||
cache = {};
|
||||
setNode();
|
||||
}
|
||||
},
|
||||
fetchMasterOpening: (() => {
|
||||
const masterCache: Dictionary<OpeningData> = {};
|
||||
return (fen: Fen): Promise<OpeningData> => {
|
||||
|
|
|
@ -156,6 +156,7 @@ export interface ExplorerCtrl {
|
|||
toggle(): void;
|
||||
disable(): void;
|
||||
setHovering(fen: Fen, uci: Uci | null): void;
|
||||
onFlip(): void;
|
||||
fetchMasterOpening(fen: Fen): Promise<OpeningData>;
|
||||
fetchTablebaseHit(fen: Fen): Promise<SimpleTablebaseHit>;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue