Skip to content

Commit cb0993e

Browse files
committed
center service catalog
1 parent 671ea5c commit cb0993e

File tree

1 file changed

+1
-5
lines changed
  • services/static-webserver/client/source/class/osparc/workbench

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,6 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
304304
return null;
305305
}
306306
const srvCat = new osparc.workbench.ServiceCatalog();
307-
const maxLeft = this.getBounds().width - osparc.workbench.ServiceCatalog.Width;
308-
const maxHeight = this.getBounds().height - osparc.workbench.ServiceCatalog.Height;
309-
const posX = Math.min(winPos.x, maxLeft);
310-
const posY = Math.min(winPos.y, maxHeight);
311-
srvCat.moveTo(posX + this.__getLeftOffset(), posY + this.__getTopOffset());
312307
srvCat.addListener("addService", async e => {
313308
const {
314309
service,
@@ -321,6 +316,7 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
321316
this._createEdgeBetweenNodes(nodeLeftId ? nodeLeftId : newNodeId, nodeRightId ? nodeRightId : newNodeId, true);
322317
}
323318
}, this);
319+
srvCat.center();
324320
srvCat.open();
325321
return srvCat;
326322
},

0 commit comments

Comments
 (0)