From d0e823beaf11abe29ae32cb917a5c553cc9369b6 Mon Sep 17 00:00:00 2001 From: Joseph Huang Date: Thu, 28 Sep 2023 12:23:37 -0700 Subject: [PATCH] No functional change, make it easier to adjust the return type --- files/src/renderer/50_table.js | 6 ++---- files/src/renderer/55_winrate_graph.js | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/files/src/renderer/50_table.js b/files/src/renderer/50_table.js index 9e081891..ccdddfdb 100644 --- a/files/src/renderer/50_table.js +++ b/files/src/renderer/50_table.js @@ -28,9 +28,7 @@ const table_prototype = { // Naphthalin's scheme: based on centipawns. - if (this.graph_y_version === this.version) { - return this.graph_y; - } else { + if (this.graph_y_version !== this.version) { let info = SortedMoveInfoFromTable(this)[0]; if (info && !info.__ghost && info.__touched && (this.nodes > 1 || this.limit === 1)) { let cp = info.cp; @@ -42,8 +40,8 @@ const table_prototype = { this.graph_y = null; } this.graph_y_version = this.version; - return this.graph_y; } + return this.graph_y; }, set_terminal_info: function(reason, ev) { // ev is ignored if reason is "" (i.e. not a terminal position) diff --git a/files/src/renderer/55_winrate_graph.js b/files/src/renderer/55_winrate_graph.js index 6f6aed7c..555d16dc 100644 --- a/files/src/renderer/55_winrate_graph.js +++ b/files/src/renderer/55_winrate_graph.js @@ -47,6 +47,7 @@ function NewGrapher() { graphctx.setLineDash([]); for (let run of runs.normal_runs) { + // Evaluation line graphctx.beginPath(); graphctx.moveTo(run[0].x1, run[0].y1); for (let edge of run) {