Skip to content

Commit

Permalink
Fix mouse event coordinates in DashboardBaseComponent for accurate po…
Browse files Browse the repository at this point in the history
…sitioning
  • Loading branch information
simlarsen committed Dec 3, 2024
1 parent b380e6d commit 99e56f9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ const DashboardBaseComponentElement: FunctionComponent<ComponentProps> = (
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;
Expand Down

0 comments on commit 99e56f9

Please sign in to comment.