mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: add scroll constraints to pinch-to-zoom in safari
This commit is contained in:
parent
82aa1cf19d
commit
4c62eef7da
1 changed files with 13 additions and 10 deletions
|
@ -4269,7 +4269,9 @@ class App extends React.Component<AppProps, AppState> {
|
|||
|
||||
const initialScale = gesture.initialScale;
|
||||
if (initialScale) {
|
||||
this.setState((state) => ({
|
||||
this.setState((state) =>
|
||||
constrainScrollState({
|
||||
...state,
|
||||
...getStateForZoom(
|
||||
{
|
||||
viewportX: this.lastViewportPosition.x,
|
||||
|
@ -4278,7 +4280,8 @@ class App extends React.Component<AppProps, AppState> {
|
|||
},
|
||||
state,
|
||||
),
|
||||
}));
|
||||
}),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue