Skip to content

Commit 44aa0d0

Browse files
committed
make variables private
1 parent 5e9a3a8 commit 44aa0d0

File tree

1 file changed

+21
-20
lines changed
  • services/static-webserver/client/source/class/osparc/workbench

1 file changed

+21
-20
lines changed

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

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ qx.Class.define("osparc.workbench.NodeUI", {
7777
rich: true,
7878
cursor: "move"
7979
});
80+
81+
this.__nodeMoving = false;
82+
83+
this.setNode(node);
84+
85+
this.__resetNodeUILayout();
86+
8087
captionTitle.addListener("appear", () => {
8188
qx.event.Timer.once(() => {
8289
const labelDom = captionTitle.getContentElement().getDomElement();
@@ -88,12 +95,6 @@ qx.Class.define("osparc.workbench.NodeUI", {
8895
}
8996
}, this, 50);
9097
});
91-
92-
this.__nodeMoving = false;
93-
94-
this.setNode(node);
95-
96-
this.__resetNodeUILayout();
9798
},
9899

99100
properties: {
@@ -174,9 +175,9 @@ qx.Class.define("osparc.workbench.NodeUI", {
174175
__svgWorkbenchCanvas: null,
175176
__inputLayout: null,
176177
__outputLayout: null,
177-
_optionsMenu: null,
178-
_markerBtn: null,
179-
_deleteBtn: null,
178+
__optionsMenu: null,
179+
__markerBtn: null,
180+
__deleteBtn: null,
180181
__nodeMoving: null,
181182

182183
getNodeType: function() {
@@ -346,14 +347,14 @@ qx.Class.define("osparc.workbench.NodeUI", {
346347
icon: "@FontAwesome5Solid/play/10"
347348
});
348349
node.attachHandlersToStartButton(startButton);
349-
this._optionsMenu.addAt(startButton, 0);
350+
this.__optionsMenu.addAt(startButton, 0);
350351

351352
const stopButton = new qx.ui.menu.Button().set({
352353
label: this.tr("Stop"),
353354
icon: "@FontAwesome5Solid/stop/10"
354355
});
355356
node.attachHandlersToStopButton(stopButton);
356-
this._optionsMenu.addAt(stopButton, 1);
357+
this.__optionsMenu.addAt(stopButton, 1);
357358
}
358359

359360
if (node.getKey().includes("parameter/int")) {
@@ -362,14 +363,14 @@ qx.Class.define("osparc.workbench.NodeUI", {
362363
icon: "@FontAwesome5Solid/sync-alt/10"
363364
});
364365
makeIterator.addListener("execute", () => node.convertToIterator("int"), this);
365-
this._optionsMenu.add(makeIterator);
366+
this.__optionsMenu.add(makeIterator);
366367
} else if (node.getKey().includes("data-iterator/int-range")) {
367368
const convertToParameter = new qx.ui.menu.Button().set({
368369
label: this.tr("Convert to Parameter"),
369370
icon: "@FontAwesome5Solid/sync-alt/10"
370371
});
371372
convertToParameter.addListener("execute", () => node.convertToParameter("int"), this);
372-
this._optionsMenu.add(convertToParameter);
373+
this.__optionsMenu.add(convertToParameter);
373374
}
374375

375376
const lock = this.getChildControl("lock");
@@ -378,11 +379,11 @@ qx.Class.define("osparc.workbench.NodeUI", {
378379
converter: val => val ? "excluded" : "visible"
379380
});
380381
}
381-
this._markerBtn.show();
382-
this.getNode().bind("marker", this._markerBtn, "label", {
382+
this.__markerBtn.show();
383+
this.getNode().bind("marker", this.__markerBtn, "label", {
383384
converter: val => val ? this.tr("Remove Marker") : this.tr("Add Marker")
384385
});
385-
this._markerBtn.addListener("execute", () => node.toggleMarker());
386+
this.__markerBtn.addListener("execute", () => node.toggleMarker());
386387

387388
const marker = this.getChildControl("marker");
388389
const updateMarker = () => {
@@ -396,7 +397,7 @@ qx.Class.define("osparc.workbench.NodeUI", {
396397
node.addListener("changeMarker", () => updateMarker());
397398
updateMarker();
398399

399-
node.getStudy().bind("pipelineRunning", this._deleteBtn, "enabled", {
400+
node.getStudy().bind("pipelineRunning", this.__deleteBtn, "enabled", {
400401
converter: running => !running
401402
});
402403

@@ -755,7 +756,7 @@ qx.Class.define("osparc.workbench.NodeUI", {
755756
},
756757

757758
__getMenuButton: function() {
758-
const optionsMenu = this._optionsMenu = new qx.ui.menu.Menu().set({
759+
const optionsMenu = this.__optionsMenu = new qx.ui.menu.Menu().set({
759760
position: "bottom-right"
760761
});
761762

@@ -767,7 +768,7 @@ qx.Class.define("osparc.workbench.NodeUI", {
767768
renameBtn.addListener("execute", () => this.fireDataEvent("renameNode", this.getNodeId()));
768769
optionsMenu.add(renameBtn);
769770

770-
const markerBtn = this._markerBtn = new qx.ui.menu.Button().set({
771+
const markerBtn = this.__markerBtn = new qx.ui.menu.Button().set({
771772
icon: "@FontAwesome5Solid/bookmark/10",
772773
visibility: "excluded"
773774
});
@@ -781,7 +782,7 @@ qx.Class.define("osparc.workbench.NodeUI", {
781782
infoBtn.addListener("execute", () => this.fireDataEvent("infoNode", this.getNodeId()));
782783
optionsMenu.add(infoBtn);
783784

784-
const deleteBtn = this._deleteBtn = new qx.ui.menu.Button().set({
785+
const deleteBtn = this.__deleteBtn = new qx.ui.menu.Button().set({
785786
label: this.tr("Delete"),
786787
icon: "@FontAwesome5Solid/trash/10"
787788
});

0 commit comments

Comments
 (0)