Skip to content

Commit dea9468

Browse files
committed
refactor
1 parent e2f1607 commit dea9468

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -565,16 +565,7 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
565565
const nodeId = e.getData();
566566
if (nodeId) {
567567
studyTreeItem.resetSelection();
568-
const workbench = this.getStudy().getWorkbench();
569-
const node = workbench.getNode(nodeId);
570-
if (node) {
571-
this.__populateSecondaryColumn(node);
572-
this.__openIframeTab(node);
573-
node.getIFrame().maximizeIFrame(true);
574-
}
575-
this.__loggerView.setCurrentNodeId(nodeId);
576-
this.__workbenchUI.nodeSelected(nodeId);
577-
568+
this.fullscreenNode(nodeId);
578569
this.getStudy().getUi().setCurrentNodeId(nodeId);
579570
}
580571
}, this);
@@ -1198,19 +1189,23 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
11981189

11991190
fullscreenNode: function(nodeId) {
12001191
const node = this.getStudy().getWorkbench().getNode(nodeId);
1201-
if (node.isDynamic()) {
1192+
if (node && node.isDynamic()) {
12021193
qx.event.Timer.once(() => {
1194+
this.__populateSecondaryColumn(node);
12031195
this.__openIframeTab(node);
12041196
node.getIFrame().maximizeIFrame(true);
12051197
}, this, 10);
12061198
}
1199+
this.__loggerView.setCurrentNodeId(nodeId);
1200+
this.__workbenchUI.nodeSelected(nodeId);
12071201
},
12081202

12091203
openFirstNode: function() {
12101204
const validNodes = this.getStudy().getNonFrontendNodes();
12111205
if (validNodes.length === 1 && validNodes[0].isDynamic()) {
12121206
const dynamicNode = validNodes[0];
12131207
this.fullscreenNode(dynamicNode.getNodeId());
1208+
this.getStudy().getUi().setCurrentNodeId(dynamicNode.getNodeId());
12141209
} else {
12151210
this.setMaximized(false);
12161211
this.nodeSelected(this.getStudy().getUuid());

services/static-webserver/client/source/class/osparc/ui/message/Loading.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ qx.Class.define("osparc.ui.message.Loading", {
108108
__maxButton: null,
109109

110110
__buildLayout: function() {
111-
this._add(new qx.ui.core.Spacer(), {
111+
this._add(new qx.ui.core.Widget(), {
112112
column: 0,
113113
row: 0
114114
});
@@ -209,6 +209,7 @@ qx.Class.define("osparc.ui.message.Loading", {
209209
__createMaximizeToolbar: function() {
210210
const maximize = false;
211211
const maxButton = this.__maxButton = osparc.widget.PersistentIframe.createToolbarButton(maximize).set({
212+
maxHeight: 25,
212213
label: osparc.widget.PersistentIframe.getZoomLabel(maximize),
213214
icon: osparc.widget.PersistentIframe.getZoomIcon(maximize),
214215
});

0 commit comments

Comments
 (0)