From 99e56f93122e59a1e12e17a7b6447bb5272f840a Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Tue, 3 Dec 2024 17:14:36 +0000 Subject: [PATCH] Fix mouse event coordinates in DashboardBaseComponent for accurate positioning --- .../Dashboard/Components/DashboardBaseComponent.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dashboard/src/Components/Dashboard/Components/DashboardBaseComponent.tsx b/Dashboard/src/Components/Dashboard/Components/DashboardBaseComponent.tsx index 0703638f8c..b96076574e 100644 --- a/Dashboard/src/Components/Dashboard/Components/DashboardBaseComponent.tsx +++ b/Dashboard/src/Components/Dashboard/Components/DashboardBaseComponent.tsx @@ -100,8 +100,8 @@ const DashboardBaseComponentElement: FunctionComponent = ( const dashboardComponentOldTopInPx: number = topInPx; const dashboardComponentOldLeftInPx: number = leftInPx; - const newMoveToTop: number = mouseEvent.pageY; - const newMoveToLeft: number = mouseEvent.pageX; + const newMoveToTop: number = mouseEvent.clientY; + const newMoveToLeft: number = mouseEvent.clientX; const deltaXInPx: number = newMoveToLeft - dashboardComponentOldLeftInPx; const deltaYInPx: number = newMoveToTop - dashboardComponentOldTopInPx;