Skip to content

Commit 08e5a50

Browse files
committed
properly set coordinates of node's origin prior to drag operation
1 parent b5663aa commit 08e5a50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/traces/sankey/render.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,8 @@ function attachDragHandler(sankeyNode, sankeyLink, callbacks) {
477477
var dragBehavior = d3.behavior.drag()
478478
.origin(function(d) {
479479
return {
480-
x: d.node.x0,
481-
y: d.node.y0
480+
x: d.node.x0 + d.visibleWidth / 2,
481+
y: d.node.y0 + d.visibleHeight / 2
482482
};
483483
})
484484

0 commit comments

Comments
 (0)