don't set pointer on pointerMove if not already present (#889)

This commit is contained in:
David Luzar 2020-03-09 17:17:26 +01:00 committed by GitHub
parent 3bf3d96d9f
commit 5dadbcdcd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -840,10 +840,12 @@ export class App extends React.Component<any, AppState> {
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);