Skip to content

Commit 2b20a83

Browse files
committed
back to getLockState
1 parent c8cb648 commit 2b20a83

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,14 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
804804
this.__populateSecondaryColumnNode(node);
805805
}
806806

807-
if (node instanceof osparc.data.model.Node) {
808-
// OM replace this with node.getStatus().getLockState()?
809-
node.getStudy().bind("pipelineRunning", this.__serviceOptionsPage, "enabled", {
810-
converter: pipelineRunning => !pipelineRunning
807+
if (
808+
node instanceof osparc.data.model.Node &&
809+
node.isComputational() &&
810+
node.getPropsForm()
811+
) {
812+
// lock the inputs if the node is locked
813+
node.getStatus().getLockState().bind("locked", node.getPropsForm(), "enabled", {
814+
converter: locked => locked ? "visible" : "excluded"
811815
});
812816
}
813817
},

services/static-webserver/client/source/class/osparc/node/slideshow/NodeView.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
5656
node.getPropsForm().hasVisibleInputs()
5757
) {
5858
this._settingsLayout.add(node.getPropsForm());
59+
60+
// lock the inputs if the node is locked
61+
node.getStatus().getLockState().bind("locked", node.getPropsForm(), "enabled", {
62+
converter: locked => !locked
63+
});
5964
}
6065

6166
const showSettings = node.isComputational();
6267
this._settingsLayout.setVisibility(showSettings ? "visible" : "excluded");
6368

64-
// OM replace this with node.getStatus().getLockState()?
65-
node.getStudy().bind("pipelineRunning", this._settingsLayout, "enabled", {
66-
converter: pipelineRunning => !pipelineRunning
67-
});
68-
6969
this._mainView.add(this._settingsLayout);
7070
},
7171

0 commit comments

Comments
 (0)