remove #statePaths

This commit is contained in:
mosuzi 2023-07-24 22:33:13 +08:00
parent e6457c4e4e
commit eaef15f962
4 changed files with 9 additions and 7 deletions

View file

@ -342,7 +342,7 @@
<rect x="0" y="0" width="100%" height="100%" fill="white" stroke="none" /> <rect x="0" y="0" width="100%" height="100%" fill="white" stroke="none" />
</mask> </mask>
<g id="textPaths"></g> <g id="textPaths"></g>
<g id="statePaths"></g> <!-- <g id="statePaths"></g> -->
<g id="defs-emblems"></g> <g id="defs-emblems"></g>
</g> </g>

View file

@ -320,6 +320,8 @@ async function parseLoadedData(data) {
fogging = viewbox.select("#fogging"); fogging = viewbox.select("#fogging");
debug = viewbox.select("#debug"); debug = viewbox.select("#debug");
burgLabels = labels.select("#burgLabels"); burgLabels = labels.select("#burgLabels");
const statePaths = defs.select("#statePaths");
statePaths?.remove();
})(); })();
void (function parseGridData() { void (function parseGridData() {

View file

@ -1032,9 +1032,9 @@ function drawStates() {
const bodyString = bodyData.map(d => `<path id="state${d[1]}" d="${d[0]}" fill="${d[2]}" stroke="none"/>`).join(""); const bodyString = bodyData.map(d => `<path id="state${d[1]}" d="${d[0]}" fill="${d[2]}" stroke="none"/>`).join("");
const gapString = gapData.map(d => `<path id="state-gap${d[1]}" d="${d[0]}" fill="none" stroke="${d[2]}"/>`).join(""); const gapString = gapData.map(d => `<path id="state-gap${d[1]}" d="${d[0]}" fill="none" stroke="${d[2]}"/>`).join("");
const clipString = bodyData // const clipString = bodyData
.map(d => `<clipPath id="state-clip${d[1]}"><use href="#state${d[1]}"/></clipPath>`) // .map(d => `<clipPath id="state-clip${d[1]}"><use href="#state${d[1]}"/></clipPath>`)
.join(""); // .join("");
const haloString = haloData const haloString = haloData
.map( .map(
d => d =>
@ -1045,7 +1045,7 @@ function drawStates() {
.join(""); .join("");
statesBody.html(bodyString + gapString); statesBody.html(bodyString + gapString);
defs.select("#statePaths").html(clipString); // defs.select("#statePaths").html(clipString);
statesHalo.html(haloString); statesHalo.html(haloString);
// connect vertices to chain // connect vertices to chain

View file

@ -225,8 +225,8 @@
"#statesHalo": { "#statesHalo": {
"opacity": 0.4, "opacity": 0.4,
"data-width": 10, "data-width": 10,
"stroke-width": 10, "stroke-width": 2,
"filter": "blur(3.5px)" "filter": "none"
}, },
"#provs": { "#provs": {
"opacity": 0.7, "opacity": 0.7,