Skip to content

Commit 628976a

Browse files
authored
Fix shifting node by click (#40)
1 parent fc4d6eb commit 628976a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2011-2020 PlayCanvas Ltd.
1+
Copyright (c) 2011-2022 PlayCanvas Ltd.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/graph-view-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ class GraphViewNode {
455455
switch (event) {
456456
case 'updatePosition': {
457457
nodeView.on('element:pointerup', () => {
458-
var newPos = this._graphView.getWindowToGraphPosition(nodeView.el.getBoundingClientRect());
458+
var newPos = this._graphView.getWindowToGraphPosition(nodeView.getBBox());
459459
callback(this.nodeData.id, newPos);
460460
});
461461
break;

0 commit comments

Comments
 (0)