refactor: General performance/style improvements (#262)

This commit is contained in:
Adam Brangenberg
2022-12-29 16:43:41 +01:00
committed by GitHub
parent dc43737896
commit 614a6222a1
10 changed files with 84 additions and 66 deletions

View File

@ -113,7 +113,7 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig) {
.append("svg")
.attr("width", width)
.attr("height", height)
.attr('viewBox', [-width / 2 * 1 / scale, -height / 2 * 1 / scale, width * 1 / scale, height * 1 / scale])
.attr('viewBox', [-width / 2 / scale, -height / 2 / scale, width / scale, height / scale])
if (enableLegend) {
const legend = [{ Current: "var(--g-node-active)" }, { Note: "var(--g-node)" }, ...pathColors]