Skip to content

Commit

Permalink
fix(core): bug with panning on mobiles
Browse files Browse the repository at this point in the history
The mouseXY position should be taken from the points array.

Fixes #459
  • Loading branch information
markmcdowell committed Jan 1, 2021
1 parent 4fb31cf commit db34691
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/EventCapture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export class EventCapture extends React.Component<EventCaptureProps, EventCaptur
dx = mouseXY[0] - panOrigin[0];
dy = mouseXY[1] - panOrigin[1];
} else {
mouseXY = pointer(e, this.ref.current);
mouseXY = pointers(e, this.ref.current)[0];
this.lastNewPos = mouseXY;
dx = panOrigin[0] - mouseXY[0];
dy = panOrigin[1] - mouseXY[1];
Expand Down

0 comments on commit db34691

Please sign in to comment.