From c6c415ba4c7e6dc65c74e4a2c8cb9374d8597e22 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 20 Feb 2021 21:21:28 +0300 Subject: [PATCH 1/2] v1.5.44 - shortcut + spelling --- index.html | 2 +- modules/ui/general.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 5a33c573..3cb08413 100644 --- a/index.html +++ b/index.html @@ -2667,7 +2667,7 @@
- + diff --git a/modules/ui/general.js b/modules/ui/general.js index 4ad5a21f..4d415549 100644 --- a/modules/ui/general.js +++ b/modules/ui/general.js @@ -480,6 +480,7 @@ document.addEventListener("keyup", event => { else if (shift && key === 78) editNamesbase(); // Shift + "N" to edit Namesbase else if (shift && key === 90) editZones(); // Shift + "Z" to edit Zones else if (shift && key === 82) editReligions(); // Shift + "R" to edit Religions + else if (shift && key === 89) openEmblemEditor(); // Shift + "Y" to edit Emblems else if (shift && key === 81) editUnits(); // Shift + "Q" to edit Units else if (shift && key === 79) editNotes(); // Shift + "O" to edit Notes else if (shift && key === 84) overviewBurgs(); // Shift + "T" to open Burgs overview From 75c17da355cdb0ab7a6c946179b2dcca89e11f29 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 20 Feb 2021 21:30:00 +0300 Subject: [PATCH 2/2] v1.5.45 - highlightEmblem move to debug layer --- modules/ui/general.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/ui/general.js b/modules/ui/general.js index 4d415549..d6de7148 100644 --- a/modules/ui/general.js +++ b/modules/ui/general.js @@ -303,13 +303,12 @@ function getPopulationTip(i) { } function highlightEmblemElement(type, el) { - if (emblems.selectAll("line, circle").size()) return; const i = el.i, cells = pack.cells; const animation = d3.transition().duration(1000).ease(d3.easeSinIn); if (type === "burg") { const {x, y} = el; - emblems.append("circle").attr("cx", x).attr("cy", y).attr("r", 0) + debug.append("circle").attr("cx", x).attr("cy", y).attr("r", 0) .attr("fill", "none").attr("stroke", "#d0240f").attr("stroke-width", 1).attr("opacity", 1) .transition(animation).attr("r", 20).attr("opacity", .1).attr("stroke-width", 0).remove(); return; @@ -320,7 +319,7 @@ function highlightEmblemElement(type, el) { const borderCells = cells.i.filter(id => obj[id] === i && cells.c[id].some(n => obj[n] !== i)); const data = Array.from(borderCells).filter((c, i) => !(i%2)).map(i => cells.p[i]).map(i => [i[0], i[1], Math.hypot(i[0]-x, i[1]-y)]); - emblems.selectAll("line").data(data).enter().append("line") + debug.selectAll("line").data(data).enter().append("line") .attr("x1", x).attr("y1", y).attr("x2", d => d[0]).attr("y2", d => d[1]) .attr("stroke", "#d0240f").attr("stroke-width", .5).attr("opacity", .2) .attr("stroke-dashoffset", d => d[2]).attr("stroke-dasharray", d => d[2])