Skip to content

Commit 7c1cf01

Browse files
committed
minors
1 parent 1aa419f commit 7c1cf01

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

services/static-webserver/client/source/class/osparc/data/model/Node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ qx.Class.define("osparc.data.model.Node", {
621621

622622
__applyOutputs: function() {
623623
if (!this.isPropertyInitialized("outputsForm") || !this.getOutputsForm()) {
624-
const nodeOutputs = new osparc.widget.NodeOutputs(this, this.getMetaData().outputs);
624+
const nodeOutputs = new osparc.widget.NodeOutputs(this);
625625
this.setOutputsForm(nodeOutputs);
626626
}
627627
},

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,17 +440,17 @@ qx.Class.define("osparc.desktop.StudyEditor", {
440440
const socket = osparc.wrapper.WebSocket.getInstance();
441441
if (!socket.slotExists("stateInputPorts")) {
442442
socket.on("stateInputPorts", data => {
443-
this.__statePortReceived(data);
443+
this.__statePortReceived(data, "stateInputPorts");
444444
}, this);
445445
}
446446
if (!socket.slotExists("stateOutputPorts")) {
447447
socket.on("stateOutputPorts", data => {
448-
this.__statePortReceived(data);
448+
this.__statePortReceived(data, "stateOutputPorts");
449449
}, this);
450450
}
451451
},
452452

453-
__statePortReceived: function(socketData) {
453+
__statePortReceived: function(socketData, msgName) {
454454
const studyId = socketData["project_id"];
455455
if (this.getStudy().getUuid() !== studyId) {
456456
return;
@@ -467,7 +467,7 @@ qx.Class.define("osparc.desktop.StudyEditor", {
467467
}
468468

469469
const propsForm = node.getPropsForm();
470-
if (propsForm) {
470+
if (msgName === "stateInputPorts" && propsForm) {
471471
const portId = socketData["port_key"];
472472
const status = socketData["status"];
473473
switch (status) {
@@ -487,7 +487,7 @@ qx.Class.define("osparc.desktop.StudyEditor", {
487487
}
488488

489489
const outputsForm = node.getOutputsForm();
490-
if (outputsForm) {
490+
if (msgName === "stateOutputPorts" && outputsForm) {
491491
const portId = socketData["port_key"];
492492
const status = socketData["status"];
493493
switch (status) {

services/static-webserver/client/source/class/osparc/widget/NodeOutputs.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ qx.Class.define("osparc.widget.NodeOutputs", {
2929

3030
/**
3131
* @param node {osparc.data.model.Node} Node owning the widget
32-
* @param ports {Object} Port owning the widget
3332
*/
34-
construct: function(node, ports) {
33+
construct: function(node) {
3534
this.base(arguments);
3635

3736
this._setLayout(new qx.ui.layout.VBox(15));
@@ -47,7 +46,7 @@ qx.Class.define("osparc.widget.NodeOutputs", {
4746

4847
this.set({
4948
node,
50-
ports
49+
ports: node.getMetaData().outputs
5150
});
5251

5352
node.addListener("changeOutputs", () => this.__outputsChanged(), this);

0 commit comments

Comments
 (0)