v1.5.22 - rendered check and style check

This commit is contained in:
Azgaar 2021-02-12 20:17:58 +03:00
parent 63e66b1678
commit fd8489b39d
3 changed files with 6 additions and 2 deletions

View file

@ -450,7 +450,7 @@ function invokeActiveZooming() {
const size = this.getAttribute("font-size") * scale; const size = this.getAttribute("font-size") * scale;
const hidden = hideEmblems.checked && (size < 25 || size > 300); const hidden = hideEmblems.checked && (size < 25 || size > 300);
if (hidden) this.classList.add("hidden"); else this.classList.remove("hidden"); if (hidden) this.classList.add("hidden"); else this.classList.remove("hidden");
if (!hidden && COArenderer && this.children.length && !this.children[0].getAttribute("href")) renderGroupCOAs(this); if (!hidden && window.COArenderer && this.children.length && !this.children[0].getAttribute("href")) renderGroupCOAs(this);
}); });
} }

View file

@ -195,6 +195,10 @@
if (parent === "custom") parent = null; if (parent === "custom") parent = null;
let usedPattern = null, usedTinctures = []; let usedPattern = null, usedTinctures = [];
// TO-DO
// test in FF
// stringify COA on save?
const t1 = P(kinship) ? parent.t1 : getTincture("field"); const t1 = P(kinship) ? parent.t1 : getTincture("field");
if (t1.includes("-")) usedPattern = t1; if (t1.includes("-")) usedPattern = t1;
const coa = {t1}; const coa = {t1};

View file

@ -709,7 +709,7 @@ function applyStyleOnLoad() {
stylePreset.value = preset; stylePreset.value = preset;
stylePreset.dataset.old = preset; stylePreset.dataset.old = preset;
} else { } else {
preset && ERROR && console.error(`Style preset ${preset} is not available in localStorage, applying default style`); if (preset !== "styleDefault" && ERROR) console.error(`Style preset ${preset} is not available in localStorage, applying default style`);
stylePreset.value = "styleDefault"; stylePreset.value = "styleDefault";
stylePreset.dataset.old = preset; stylePreset.dataset.old = preset;
applyDefaultStyle(); applyDefaultStyle();