Skip to content

Commit d9e28f4

Browse files
committed
simplify
1 parent b4f37a9 commit d9e28f4

File tree

1 file changed

+7
-17
lines changed
  • services/static-webserver/client/source/class/osparc/ui/message

1 file changed

+7
-17
lines changed

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

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,6 @@ qx.Class.define("osparc.ui.message.Loading", {
8080
LOGO_HEIGHT: 100,
8181
ICON_HEIGHT: 220,
8282
STATUS_ICON_SIZE: 20,
83-
84-
GRID_POS: {
85-
TOOLBAR: 0,
86-
SPACER_TOP: 1,
87-
LOGO: 2,
88-
WAITING: 3,
89-
MESSAGES: 4,
90-
EXTRA_WIDGETS: 5,
91-
SPACER_BOTTOM: 6,
92-
}
9383
},
9484

9585
members: {
@@ -101,10 +91,10 @@ qx.Class.define("osparc.ui.message.Loading", {
10191

10292
__buildLayout: function() {
10393
const maxLayout = this.__createMaximizeToolbar();
104-
this._addAt(maxLayout, this.self().GRID_POS.TOOLBAR);
94+
this._add(maxLayout);
10595

10696
const topSpacer = new qx.ui.core.Spacer();
107-
this._addAt(topSpacer, this.self().GRID_POS.SPACER_TOP, {
97+
this._add(topSpacer, {
10898
flex: 1,
10999
});
110100

@@ -125,7 +115,7 @@ qx.Class.define("osparc.ui.message.Loading", {
125115
height: logoHeight
126116
});
127117
}
128-
this._addAt(thumbnail, this.self().GRID_POS.LOGO);
118+
this._add(thumbnail);
129119

130120
const waitingHeader = this.__header = new qx.ui.basic.Atom().set({
131121
icon: "@FontAwesome5Solid/circle-notch/"+this.self().STATUS_ICON_SIZE,
@@ -143,20 +133,20 @@ qx.Class.define("osparc.ui.message.Loading", {
143133
wrap: true,
144134
alignX: "center",
145135
});
146-
this._addAt(waitingHeader, this.self().GRID_POS.WAITING);
136+
this._add(waitingHeader);
147137

148138
const messages = this.__messagesContainer = new qx.ui.container.Composite(new qx.ui.layout.VBox(10).set({
149139
alignX: "center"
150140
}));
151-
this._addAt(messages, this.self().GRID_POS.MESSAGES);
141+
this._add(messages);
152142

153143
const extraWidgets = this.__extraWidgets = new qx.ui.container.Composite(new qx.ui.layout.VBox(10).set({
154144
alignX: "center"
155145
}));
156-
this._addAt(extraWidgets, this.self().GRID_POS.EXTRA_WIDGETS);
146+
this._add(extraWidgets);
157147

158148
const bottomSpacer = new qx.ui.core.Spacer();
159-
this._addAt(bottomSpacer, this.self().GRID_POS.SPACER_BOTTOM, {
149+
this._add(bottomSpacer, {
160150
flex: 1,
161151
});
162152
},

0 commit comments

Comments
 (0)