read analysis initial path from the location hash
parent
8dcefdca14
commit
50e63013aa
|
@ -1904,6 +1904,7 @@ var storage = {
|
|||
}
|
||||
}
|
||||
};
|
||||
data.path = window.location.hash ? location.hash.replace(/#/, '') : '';
|
||||
analyse = LichessAnalyse(element.querySelector('.analyse'), cfg.data, cfg.routes, cfg.i18n, lichess.analyse.onChange);
|
||||
lichess.analyse.jump = analyse.jump;
|
||||
|
||||
|
|
|
@ -11,10 +11,12 @@ module.exports = function(cfg, router, i18n, onChange) {
|
|||
this.data = data({}, cfg);
|
||||
this.analyse = new analyse(this.data.game, this.data.analysis);
|
||||
|
||||
var initialPath = cfg.path ? treePath.read(cfg.path) : treePath.default();
|
||||
|
||||
this.vm = {
|
||||
flip: false,
|
||||
path: treePath.default(),
|
||||
pathStr: treePath.write(treePath.default()),
|
||||
path: initialPath,
|
||||
pathStr: treePath.write(initialPath),
|
||||
situation: null,
|
||||
continue: false
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue