From 5dadbcdcd54e4b658512c85d205cccf7e1e9128f Mon Sep 17 00:00:00 2001 From: David Luzar Date: Mon, 9 Mar 2020 17:17:26 +0100 Subject: [PATCH] don't set pointer on pointerMove if not already present (#889) --- src/components/App.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index ffa5997c..95ab228d 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -840,10 +840,12 @@ export class App extends React.Component { this.canvas, ); this.savePointer(pointerCoords); - gesture.pointers.set(event.pointerId, { - x: event.clientX, - y: event.clientY, - }); + if (gesture.pointers.has(event.pointerId)) { + gesture.pointers.set(event.pointerId, { + x: event.clientX, + y: event.clientY, + }); + } if (gesture.pointers.size === 2) { const center = getCenter(gesture.pointers);