Fix pinch-zoom on mobile (#467)

* Update dependencies

* Fix pinch-zoom on mobile
This commit is contained in:
Piotr Rogowski 2022-03-16 23:02:03 +01:00 committed by GitHub
parent 1d446b9c56
commit 154dd7cbc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 493 additions and 471 deletions

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="/icons/icon.ico" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#222629" />
<link rel="apple-touch-icon" href="/icons/icon.png" />
<link rel="manifest" href="/manifest.json" />

957
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -108,6 +108,11 @@ const touchZoomPlugin = () => {
};
over.addEventListener('touchstart', (e: TouchEvent) => {
if (e.touches.length > 1) {
// prevent default pinch zoom
e.preventDefault();
}
rect = over.getBoundingClientRect();
storePos(fr, e);