From d7cc3195a478377626edba78aaf548b43d491185 Mon Sep 17 00:00:00 2001 From: Khabibullin Rustam Date: Tue, 25 Jan 2022 22:54:46 +0700 Subject: [PATCH] fix transform scale issue when Sortable container has transform scale, getEdgeOffset do wrong offset calculation --- src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index 4b884b755..0afd149eb 100644 --- a/src/utils.js +++ b/src/utils.js @@ -161,8 +161,8 @@ export function getEdgeOffset(node, parent, offset = {left: 0, top: 0}) { // Get the actual offsetTop / offsetLeft value, no matter how deep the node is nested const nodeOffset = { - left: offset.left + node.offsetLeft, - top: offset.top + node.offsetTop, + left: offset.left + node.getBoundingClientRect().left, + top: offset.top + node.getBoundingClientRect().top, }; if (node.parentNode === parent) {