update analysis charts on load
This commit is contained in:
parent
1f41a9a540
commit
8dcefdca14
|
@ -1859,8 +1859,11 @@ var storage = {
|
|||
point.select(false);
|
||||
});
|
||||
};
|
||||
var chart, point, adv, title;
|
||||
analyse = LichessAnalyse(element.querySelector('.analyse'), cfg.data, cfg.routes, cfg.i18n, function(fen, path) {
|
||||
var lastFen, lastPath;
|
||||
lichess.analyse.onChange = function(fen, path) {
|
||||
lastFen = fen = fen || lastFen;
|
||||
lastPath = path = path || lastPath;
|
||||
var chart, point, adv, title;
|
||||
$inputFen.val(fen);
|
||||
if ($advChart.length) {
|
||||
chart = $advChart.highcharts();
|
||||
|
@ -1900,7 +1903,8 @@ var storage = {
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
analyse = LichessAnalyse(element.querySelector('.analyse'), cfg.data, cfg.routes, cfg.i18n, lichess.analyse.onChange);
|
||||
lichess.analyse.jump = analyse.jump;
|
||||
|
||||
$('.underboard_content', element).appendTo($('.underboard .center', element)).show();
|
||||
|
|
|
@ -129,6 +129,7 @@ $(function() {
|
|||
gridLineWidth: 0
|
||||
}
|
||||
}));
|
||||
lichess.analyse.onChange();
|
||||
});
|
||||
|
||||
$.renderMoveTimesChart = function() {
|
||||
|
@ -211,6 +212,7 @@ $(function() {
|
|||
}
|
||||
}));
|
||||
});
|
||||
lichess.analyse.onChange();
|
||||
};
|
||||
if ($('#movetimes_chart:visible:not(.rendered)').length) $.renderMoveTimesChart();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue