remove canvasCombos from all layers

This commit is contained in:
themancalledjakob 2024-03-16 14:46:05 +01:00
parent 7c01738d6d
commit e5ce29a4e9

View file

@ -634,9 +634,6 @@ const Audio = function(tp, record) {
button.classList.remove('active');
});
} else {
// only selected layers have options
// otherwise the ui is not there
if (layer.isSelected()) {
if (config.audio.colorSeparateRGBA && propTitle === 'color') {
delete canvasCombos['color.r'];
delete canvasCombos['color.g'];
@ -645,6 +642,9 @@ const Audio = function(tp, record) {
} else {
delete canvasCombos[propTitle];
}
// only selected layers have options
// otherwise the ui is not there
if (layer.isSelected()) {
const audioOptions = panel.querySelectorAll(toCssClass(`audioOptions${propTitle}`,'.'));
if (audioOptions.length > 0) {
audioOptions.forEach((e) => { e.remove(); });