This commit is contained in:
Azgaar 2024-02-19 18:58:59 +01:00
parent c282ecbb37
commit 1faaee48e0
4 changed files with 154 additions and 37 deletions

View file

@ -815,5 +815,16 @@ export function resolveVersionConflicts(version) {
fitScaleBar(scaleBar, svgWidth, svgHeight);
if (!layerIsOn("toggleScaleBar")) scaleBar.style("display", "none");
// v1.96.00 changed coloring approach for regiments
armies.selectAll(":scope > g").each(function () {
const fill = this.getAttribute("fill");
if (!fill) return;
const darkerColor = d3.color(fill).darker().hex();
this.setAttribute("color", darkerColor);
this.querySelectorAll("g > rect:nth-child(2)").forEach(rect => {
rect.setAttribute("fill", "currentColor");
});
});
}
}