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" />
</mask>
<g id="textPaths"></g>
<g id="statePaths"></g>
<!-- <g id="statePaths"></g> -->
<g id="defs-emblems"></g>
</g>

View file

@ -320,6 +320,8 @@ async function parseLoadedData(data) {
fogging = viewbox.select("#fogging");
debug = viewbox.select("#debug");
burgLabels = labels.select("#burgLabels");
const statePaths = defs.select("#statePaths");
statePaths?.remove();
})();
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 gapString = gapData.map(d => `<path id="state-gap${d[1]}" d="${d[0]}" fill="none" stroke="${d[2]}"/>`).join("");
const clipString = bodyData
.map(d => `<clipPath id="state-clip${d[1]}"><use href="#state${d[1]}"/></clipPath>`)
.join("");
// const clipString = bodyData
// .map(d => `<clipPath id="state-clip${d[1]}"><use href="#state${d[1]}"/></clipPath>`)
// .join("");
const haloString = haloData
.map(
d =>
@ -1045,7 +1045,7 @@ function drawStates() {
.join("");
statesBody.html(bodyString + gapString);
defs.select("#statePaths").html(clipString);
// defs.select("#statePaths").html(clipString);
statesHalo.html(haloString);
// connect vertices to chain

View file

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