diff --git a/modules/save-and-load.js b/modules/save-and-load.js index f471e8f3..eed28881 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -1086,6 +1086,15 @@ function parseLoadedData(data) { emblems.append("g").attr("id", "stateEmblems"); regenerateEmblems(); toggleEmblems(); + + // v 1.5 changed releif icons data + terrain.selectAll("use").each(function() { + const type = this.getAttribute("data-type") || this.getAttribute("xlink:href"); + this.removeAttribute("xlink:href"); + this.removeAttribute("data-type"); + this.removeAttribute("data-size"); + this.setAttribute("href", type); + }); } }() diff --git a/modules/ui/relief-editor.js b/modules/ui/relief-editor.js index 4ed05a4e..7cd2d1d2 100644 --- a/modules/ui/relief-editor.js +++ b/modules/ui/relief-editor.js @@ -54,7 +54,7 @@ function editReliefIcon() { } function updateReliefIconSelected() { - const type = elSelected.attr("href"); + const type = elSelected.attr("href") || elSelected.attr("data-type"); const button = reliefIconsDiv.querySelector("svg[data-type='"+type+"']"); reliefIconsDiv.querySelectorAll("svg.pressed").forEach(b => b.classList.remove("pressed"));