When a relay has no inputs connected, use its own mode change as the relay signal.

This commit is contained in:
rgthree
2024-05-04 21:31:07 -04:00
parent 76638e2ddc
commit 2db6c4d73a
7 changed files with 132 additions and 68 deletions
+3 -2
View File
@@ -138,8 +138,9 @@ export abstract class RgthreeBaseNode extends LGraphNode {
// @ts-ignore - Changing the property to an accessor here seems to work, but ts compiler complains.
override set mode(mode: NodeMode) {
if (this.mode_ != mode) {
const oldMode = this.mode_;
this.mode_ = mode;
this.onModeChange();
this.onModeChange(oldMode, mode);
}
}
override get mode() {
@@ -147,7 +148,7 @@ export abstract class RgthreeBaseNode extends LGraphNode {
}
/** When a mode change, we want all connected nodes to match. */
onModeChange() {
onModeChange(from: NodeMode, to: NodeMode) {
// Override
}