[TASK] Improve labelupdate after mode change

This commit is contained in:
Xaver Maierhofer 2017-01-16 02:10:21 +01:00
parent 4fbe147bb5
commit 5013ffa814
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8

View File

@ -339,7 +339,7 @@ define(["map/clientlayer", "map/labelslayer",
document.querySelector("head").innerHTML += "<link rel='stylesheet' class='css-mode' href='" + e.layer.options.mode + ".css'>";
document.querySelector("html").classList.add(e.layer.options.mode);
var cssInterval = setInterval(function () {
if (document.querySelector(".css-mode").sheet) {
if (typeof document.querySelector(".css-mode").sheet.cssRules != 'undefined') {
labelsLayer.updateColor();
clearInterval(cssInterval);
}