forked from MapComplete/MapComplete
A11y: reset zoom (chromium-browsers only) when getting back to the map or when opening a picture
This commit is contained in:
parent
41e7108b2e
commit
9655f8a092
10 changed files with 145 additions and 21 deletions
|
@ -5,12 +5,16 @@
|
|||
import panzoom from "panzoom"
|
||||
import type { ProvidedImage } from "../../Logic/ImageProviders/ImageProvider"
|
||||
import { UIEventSource } from "../../Logic/UIEventSource"
|
||||
import Zoomcontrol from "../Zoomcontrol"
|
||||
import { onDestroy, onMount } from "svelte"
|
||||
|
||||
export let image: ProvidedImage
|
||||
let panzoomInstance = undefined
|
||||
let panzoomEl: HTMLElement
|
||||
export let isLoaded: UIEventSource<boolean> = undefined
|
||||
|
||||
|
||||
onDestroy(Zoomcontrol.createLock())
|
||||
|
||||
$: {
|
||||
if (panzoomEl) {
|
||||
panzoomInstance = panzoom(panzoomEl, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue