From bdb1c6eb8267e20e214c9b39ca16d4158fe9277e Mon Sep 17 00:00:00 2001 From: Dmitry Ivakhnenko Date: Mon, 8 Jan 2024 18:18:10 +0300 Subject: [PATCH] fix infinity updates --- packages/react-dnd-preview/src/offsets.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-dnd-preview/src/offsets.ts b/packages/react-dnd-preview/src/offsets.ts index 354ac34e..d5dd783d 100644 --- a/packages/react-dnd-preview/src/offsets.ts +++ b/packages/react-dnd-preview/src/offsets.ts @@ -16,8 +16,8 @@ export type Point = { const subtract = (a: Point, b: Point): Point => { return { - x: a.x - b.x, - y: a.y - b.y, + x: Math.round(a.x - b.x), + y: Math.round(a.y - b.y), } }