mirror of
https://github.com/wled/WLED.git
synced 2025-07-12 13:26:33 +00:00
Hide palette dialog if not available
This commit is contained in:
parent
1578aa7cb6
commit
2abbf7e762
@ -1598,6 +1598,10 @@ function setEffectParameters(idx)
|
|||||||
// disable palette list
|
// disable palette list
|
||||||
text += ' not used';
|
text += ' not used';
|
||||||
palw.style.display = "none";
|
palw.style.display = "none";
|
||||||
|
// hide palette dialog if not available
|
||||||
|
if (gId("palw").lastElementChild.classList.contains("dialog")) {
|
||||||
|
gId("palw").lastElementChild.classList.add("hide");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pall.innerHTML = icon + text;
|
pall.innerHTML = icon + text;
|
||||||
// not all color selectors shown, hide palettes created from color selectors
|
// not all color selectors shown, hide palettes created from color selectors
|
||||||
@ -2275,7 +2279,7 @@ function setPalette(paletteId = null)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (simplifiedUI) {
|
if (simplifiedUI) {
|
||||||
gId("palw").lastChild.classList.toggle("hide");
|
gId("palw").lastElementChild.classList.toggle("hide");
|
||||||
}
|
}
|
||||||
|
|
||||||
var obj = {"seg": {"pal": paletteId}};
|
var obj = {"seg": {"pal": paletteId}};
|
||||||
@ -3056,9 +3060,9 @@ function simplifyUI() {
|
|||||||
btn.innerText = "Change palette";
|
btn.innerText = "Change palette";
|
||||||
function togglePal(e) {
|
function togglePal(e) {
|
||||||
if (e.target != btn && e.target != div) return;
|
if (e.target != btn && e.target != div) return;
|
||||||
gId("palw").lastElementChild.classList.toggle("hide");
|
div.classList.toggle("hide");
|
||||||
clean(gId("palw").lastElementChild.firstElementChild.children[1]);
|
clean(div.firstElementChild.children[1]);
|
||||||
gId("palw").lastElementChild.scrollTop = 0;
|
div.scrollTop = 0;
|
||||||
};
|
};
|
||||||
btn.addEventListener("click", togglePal);
|
btn.addEventListener("click", togglePal);
|
||||||
div.addEventListener("click", togglePal);
|
div.addEventListener("click", togglePal);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user