Update status and catch node labels in group mode

This commit is contained in:
Steve-Mcl
2023-05-29 22:47:29 +01:00
parent 26a770e490
commit a78da0db1e
3 changed files with 14 additions and 2 deletions

View File

@@ -41,7 +41,9 @@
if (this.name) {
return this.name;
}
if (this.scope) {
if (this.scope === "group") {
return this._("catch.catchGroup");
} else if (Array.isArray(this.scope)) {
return this._("catch.catchNodes",{number:this.scope.length});
}
return this.uncaught?this._("catch.catchUncaught"):this._("catch.catch")

View File

@@ -33,7 +33,15 @@
outputs:1,
icon: "status.svg",
label: function() {
return this.name||(this.scope?this._("status.statusNodes",{number:this.scope.length}):this._("status.status"));
if (this.name) {
return this.name;
}
if (this.scope === "group") {
return this._("status.statusGroup");
} else if (Array.isArray(this.scope)) {
return this._("status.statusNodes",{number:this.scope.length});
}
return this._("status.status")
},
labelStyle: function() {
return this.name?"node_label_italic":"";