forked from MapComplete/MapComplete
Feature(360): improve showing images, improve typing
This commit is contained in:
parent
aa5c309887
commit
ed8414dab9
6 changed files with 52 additions and 19 deletions
|
@ -5,7 +5,7 @@
|
|||
import ImageAttribution from "./ImageAttribution.svelte"
|
||||
import { Store } from "../../Logic/UIEventSource"
|
||||
|
||||
import type { ProvidedImage } from "../../Logic/ImageProviders/ImageProvider"
|
||||
import type { HotspotProperties, ProvidedImage } from "../../Logic/ImageProviders/ImageProvider"
|
||||
import { Mapillary } from "../../Logic/ImageProviders/Mapillary"
|
||||
import { UIEventSource } from "../../Logic/UIEventSource"
|
||||
import { MagnifyingGlassPlusIcon } from "@babeard/svelte-heroicons/outline"
|
||||
|
@ -13,7 +13,7 @@
|
|||
import ImageOperations from "./ImageOperations.svelte"
|
||||
import Popup from "../Base/Popup.svelte"
|
||||
import { onDestroy } from "svelte"
|
||||
import type { Feature, Point } from "geojson"
|
||||
import type { Feature, Geometry, Point } from "geojson"
|
||||
import Loading from "../Base/Loading.svelte"
|
||||
import Translations from "../i18n/Translations"
|
||||
import Tr from "../Base/Tr.svelte"
|
||||
|
@ -35,7 +35,7 @@
|
|||
export let attributionFormat: "minimal" | "medium" | "large" = "medium"
|
||||
let previewedImage: UIEventSource<Partial<ProvidedImage>> = MenuState.previewedImage
|
||||
export let canZoom = previewedImage !== undefined
|
||||
export let nearbyFeatures: Feature[] | Store<Feature[]> = []
|
||||
export let nearbyFeatures: Feature<Geometry, HotspotProperties>[] | Store<Feature<Geometry, HotspotProperties>[]> = []
|
||||
|
||||
let loaded = false
|
||||
let showBigPreview = new UIEventSource(false)
|
||||
|
@ -76,6 +76,7 @@
|
|||
}
|
||||
state?.geocodedImages.set([f])
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<Popup shown={showBigPreview} bodyPadding="p-0" dismissable={true}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue