From c0a634bec100e86aa4d3c4cc50fd411ba7a91e41 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 8 Sep 2019 21:40:48 +0300 Subject: [PATCH] v1.0.15 --- modules/save-and-load.js | 3 +++ modules/ui/layers.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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"); } }