hide palette editor when source selection changes
This commit is contained in:
parent
92312e50b0
commit
2668d7c06e
1 changed files with 3 additions and 5 deletions
|
|
@ -111,6 +111,7 @@
|
||||||
|
|
||||||
function filamentSourceEditUpdate() {
|
function filamentSourceEditUpdate() {
|
||||||
if (UI.filamentSource && UI.filamentSourceEdit) {
|
if (UI.filamentSource && UI.filamentSourceEdit) {
|
||||||
|
API.event.emit("filament.source");
|
||||||
const sel = UI.filamentSource.options[UI.filamentSource.selectedIndex];
|
const sel = UI.filamentSource.options[UI.filamentSource.selectedIndex];
|
||||||
if (sel) {
|
if (sel) {
|
||||||
UI.filamentSourceEdit.style.display = sel.value === 'palette3' ? '' : 'none';
|
UI.filamentSourceEdit.style.display = sel.value === 'palette3' ? '' : 'none';
|
||||||
|
|
@ -2836,16 +2837,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
API.event.on("device.select", () => {
|
API.event.on(["device.select", "filament.source"], () => {
|
||||||
UI.extruder.parentNode.style.display = 'flex';
|
UI.extruder.parentNode.style.display = 'flex';
|
||||||
UI.palette.parentNode.style.display = 'none';
|
UI.palette.parentNode.style.display = 'none';
|
||||||
btn.innerText = 'edit';
|
btn.innerText = 'edit';
|
||||||
btn.onclick = edit;
|
btn.onclick = edit;
|
||||||
});
|
});
|
||||||
API.event.on("device.save", () => {
|
API.event.on("device.save", editDone);
|
||||||
console.log('before device save');
|
|
||||||
editDone();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue