fix(app.tsx): use cursorx, cursory in onGestureChange as pointers are empty (#2424)

This commit is contained in:
Aakansha Doshi authored and GitHub committed 2020-11-30 02:30:13 +02:00
1 parent bdb1fb2dae
commit 084aff2bf3
1 file changed
+1 -2
+1 -2
View File
@@ -1735,12 +1735,11 @@ class App extends React.Component<ExcalidrawProps, AppState> {
private onGestureChange = withBatchedUpdates((event: GestureEvent) => {
event.preventDefault();
const gestureCenter = getCenter(gesture.pointers);
this.setState(({ zoom }) => ({
zoom: getNewZoom(
getNormalizedZoom(gesture.initialScale! * event.scale),
zoom,
gestureCenter,
{ x: cursorX, y: cursorY },
),
}));
});