diff --git a/modules/save-and-load.js b/modules/save-and-load.js index 36cf9505..07a06504 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -668,6 +668,9 @@ function parseLoadedData(data) { if (!s.diplomacy) continue; s.diplomacy = s.diplomacy.map(r => r === "Sympathy" ? "Friendly" : r); } + + // labels should be toggled via style attribute, so remove display attribute + labels.attr("display", null); } }() diff --git a/modules/ui/layers.js b/modules/ui/layers.js index 939881cf..0a2b5657 100644 --- a/modules/ui/layers.js +++ b/modules/ui/layers.js @@ -1011,11 +1011,11 @@ function toggleMarkers() { function toggleLabels() { if (!layerIsOn("toggleLabels")) { turnButtonOn("toggleLabels"); - labels.attr("display", null) + labels.style("display", null) invokeActiveZooming(); } else { turnButtonOff("toggleLabels"); - labels.attr("display", "none"); + labels.style("display", "none"); } }