Skip to content

Commit 4632e4e

Browse files
authored
Merge pull request #2 from Rustamhabibullin/patch-1
fix transform scale issue
2 parents b362fe2 + d7cc319 commit 4632e4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ export function getEdgeOffset(node, parent, offset = {left: 0, top: 0}) {
161161

162162
// Get the actual offsetTop / offsetLeft value, no matter how deep the node is nested
163163
const nodeOffset = {
164-
left: offset.left + node.offsetLeft,
165-
top: offset.top + node.offsetTop,
164+
left: offset.left + node.getBoundingClientRect().left,
165+
top: offset.top + node.getBoundingClientRect().top,
166166
};
167167

168168
if (node.parentNode === parent) {

0 commit comments

Comments
 (0)