Skip to content

Commit 19808c2

Browse files
committed
refactor
1 parent d55bd3b commit 19808c2

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ qx.Class.define("osparc.workbench.BaseNodeUI", {
256256
},
257257

258258
_setPositionFromEvent: function(e) {
259+
// this.__dragRange is defined in qx.ui.core.MMovable
259260
const sideBarWidth = this.__dragRange.left;
260261
const navigationBarHeight = this.__dragRange.top;
261262
const native = e.getNativeEvent();
@@ -273,6 +274,8 @@ qx.Class.define("osparc.workbench.BaseNodeUI", {
273274
if (!this.hasState("move") || !this.getIsMovable()) {
274275
return;
275276
}
277+
const coords = this._setPositionFromEvent(e);
278+
this.getNode().setPosition(coords);
276279
e.stopPropagation();
277280
if (this.__nodeMoving === false) {
278281
this.__nodeMoving = true;

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -610,17 +610,6 @@ qx.Class.define("osparc.workbench.NodeUI", {
610610
};
611611
},
612612

613-
// override qx.ui.core.MMovable
614-
_onMovePointerMove: function(e) {
615-
// Only react when dragging is active
616-
if (!this.hasState("move") || !this.getIsMovable()) {
617-
return;
618-
}
619-
const coords = this._setPositionFromEvent(e);
620-
this.getNode().setPosition(coords);
621-
this.base(arguments, e);
622-
},
623-
624613
setPosition: function(pos) {
625614
const node = this.getNode();
626615
node.setPosition(pos);

0 commit comments

Comments
 (0)