Skip to content

Commit 225a380

Browse files
committed
refactoring
1 parent 0b25b9b commit 225a380

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
3838

3939
statics: {
4040
LOGGER_HEIGHT: 28,
41-
42-
isPropsFormShowable: function(node) {
43-
if (node && ("getPropsForm" in node) && node.getPropsForm()) {
44-
return node.getPropsForm().hasVisibleInputs();
45-
}
46-
return false;
47-
},
4841
},
4942

5043
members: {
@@ -55,9 +48,14 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
5548
this._settingsLayout.removeAll();
5649

5750
const node = this.getNode();
58-
const propsForm = node.getPropsForm();
59-
if (propsForm && node.hasInputs()) {
60-
this._settingsLayout.add(propsForm);
51+
if (
52+
node.isComputational() &&
53+
node.hasInputs() &&
54+
"getPropsForm" in node &&
55+
node.getPropsForm() &&
56+
node.getPropsForm().hasVisibleInputs()
57+
) {
58+
this._settingsLayout.add(node.getPropsForm());
6159
}
6260

6361
const showSettings = node.isComputational();

services/static-webserver/client/source/class/osparc/workbench/NodeUI.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,10 @@ qx.Class.define("osparc.workbench.NodeUI", {
398398
}
399399

400400
const lock = this.getChildControl("lock");
401-
if (node.getPropsForm()) {
402-
node.getPropsForm().bind("enabled", lock, "visibility", {
403-
converter: val => val ? "excluded" : "visible"
404-
});
405-
}
401+
node.getStudy().bind("pipelineRunning", lock, "visibility", {
402+
converter: pipelineRunning => !pipelineRunning ? "visible" : "excluded"
403+
});
404+
406405
this.__markerBtn.show();
407406
this.getNode().bind("marker", this.__markerBtn, "label", {
408407
converter: val => val ? this.tr("Remove Marker") : this.tr("Add Marker")

0 commit comments

Comments
 (0)