fix(app.tsx): use cursorx, cursory in onGestureChange as pointers are empty (#2424)
This commit is contained in:
parent
bdb1fb2dae
commit
084aff2bf3
@ -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 },
|
||||
),
|
||||
}));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user