v1.6.15 - restore pattern on old version load

This commit is contained in:
Azgaar 2021-03-06 19:17:23 +03:00
parent 7251c1402b
commit b27a597bd2
2 changed files with 3 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

View file

@ -1175,7 +1175,9 @@ function parseLoadedData(data) {
// 1.61 changed oceanicPattern from rect to image
const pattern = document.getElementById("oceanic");
pattern.innerHTML = '<image id="oceanicPattern" href="./images/pattern1.png" width="100" height="100" opacity=".2"></image>';
const filter = pattern.firstElementChild.getAttribute("filter");
const href = filter ? "./images/" + filter.replace("url(#", "").replace(")", "") + ".png" : "";
pattern.innerHTML = `<image id="oceanicPattern" href=${href} width="100" height="100" opacity=".2"></image>`;
}
}()