fix(core): drag position update

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-20 00:38:56 +01:00
committed by Braks
parent 6df5746064
commit dd1b15029d
4 changed files with 12 additions and 26 deletions
+1 -2
View File
@@ -98,7 +98,7 @@ function useDrag(params: UseDragParams) {
nextPosition.y = snapY * Math.round(nextPosition.y / snapY)
}
const { computedPosition, position } = calcNextPosition(
const { position } = calcNextPosition(
n,
nextPosition,
nodeExtent,
@@ -108,7 +108,6 @@ function useDrag(params: UseDragParams) {
// we want to make sure that we only fire a change event when there is a changes
hasChange = hasChange || n.position.x !== nextPosition.x || n.position.y !== nextPosition.y
n.computedPosition = { ...n.computedPosition, ...computedPosition }
n.position = position
return n