This commit is contained in:
znetsixe
2026-03-11 11:13:17 +01:00
parent d56f8a382c
commit 6287708c1e
7 changed files with 1102 additions and 123 deletions

View File

@@ -52,13 +52,13 @@
icon: "font-awesome/fa-toggle-on",
label: function () {
return this.positionIcon + " " + this.category.slice(0, -1) || "Valve";
return (this.positionIcon || "") + " " + (this.category ? this.category.slice(0, -1) : "Valve");
},
oneditprepare: function() {
const waitForMenuData = () => {
if (window.EVOLV?.nodes?.measurement?.initEditor) {
window.EVOLV.nodes.measurement.initEditor(this);
if (window.EVOLV?.nodes?.valve?.initEditor) {
window.EVOLV.nodes.valve.initEditor(this);
} else {
setTimeout(waitForMenuData, 50);
}
@@ -72,6 +72,7 @@
},
oneditsave: function () {
const node = this;
let success = true;
// Validate asset properties using the asset menu
if (window.EVOLV?.nodes?.valve?.assetMenu?.saveEditor) {
@@ -95,6 +96,8 @@
node[field] = value;
});
return success;
},
});
</script>