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() {
|
||||
if (UI.filamentSource && UI.filamentSourceEdit) {
|
||||
API.event.emit("filament.source");
|
||||
const sel = UI.filamentSource.options[UI.filamentSource.selectedIndex];
|
||||
if (sel) {
|
||||
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.palette.parentNode.style.display = 'none';
|
||||
btn.innerText = 'edit';
|
||||
btn.onclick = edit;
|
||||
});
|
||||
API.event.on("device.save", () => {
|
||||
console.log('before device save');
|
||||
editDone();
|
||||
});
|
||||
API.event.on("device.save", editDone);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue