Skip to content

Commit

Permalink
Update switch.js
Browse files Browse the repository at this point in the history
  • Loading branch information
arladmin authored Jul 17, 2024
1 parent 8f2df24 commit 0a2b3fd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/noodl-viewer-react/src/nodes/std-library/switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Switch = {
name: 'Switch',
docs: 'https://docs.noodl.net/nodes/logic/switch',
category: 'Logic',
initialize: function () {
initialize() {
this._internal.state = false;
this._internal.initialized = false;
},
Expand All @@ -15,7 +15,7 @@ const Switch = {
on: {
displayName: 'On',
group: 'Change State',
valueChangedToTrue: function () {
valueChangedToTrue() {
if (this._internal.state === true) {
return;
}
Expand All @@ -27,7 +27,7 @@ const Switch = {
off: {
displayName: 'Off',
group: 'Change State',
valueChangedToTrue: function () {
valueChangedToTrue() {
if (this._internal.state === false) {
return;
}
Expand All @@ -50,7 +50,7 @@ const Switch = {
displayName: 'State',
group: 'General',
default: false,
set: function (value) {
set(value) {
this._internal.state = !!value;
this.flagOutputDirty('state');
this.emitSignals();
Expand All @@ -61,7 +61,7 @@ const Switch = {
state: {
type: 'boolean',
displayName: 'Current State',
getter: function () {
getter() {
return this._internal.state;
}
},
Expand All @@ -77,7 +77,7 @@ const Switch = {
}
},
prototypeExtensions: {
emitSignals: function () {
emitSignals() {
if (this._internal.state === true) {
this.sendSignalOnOutput('switchedToOn');
} else {
Expand Down

0 comments on commit 0a2b3fd

Please sign in to comment.