forked from MapComplete/MapComplete
Add QR-code to all popups, add direction indicator to popup and visual feedback, make reviews accessible to screenreaders (both to read them and to make them)
This commit is contained in:
parent
5567869bb4
commit
bfd818cb38
33 changed files with 415 additions and 98 deletions
|
@ -3,16 +3,20 @@
|
|||
import { ImmutableStore, Store } from "../../Logic/UIEventSource"
|
||||
import DynamicIcon from "./DynamicIcon.svelte"
|
||||
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig"
|
||||
import { Orientation } from "../../Sensors/Orientation"
|
||||
|
||||
/**
|
||||
* Renders a 'marker', which consists of multiple 'icons'
|
||||
*/
|
||||
export let marker: IconConfig[] = config?.marker
|
||||
export let marker: IconConfig[]
|
||||
export let tags: Store<Record<string, string>>
|
||||
export let rotation: TagRenderingConfig = undefined
|
||||
let _rotation = rotation
|
||||
let _rotation: Store<string> = rotation
|
||||
? tags.map((tags) => rotation.GetRenderValue(tags).Subs(tags).txt)
|
||||
: new ImmutableStore(0)
|
||||
: new ImmutableStore("0deg")
|
||||
if(rotation?.render?.txt === "{alpha}deg"){
|
||||
_rotation = Orientation.singleton.alpha.map(alpha => alpha ? (alpha)+"deg" : "0deg ")
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if marker && marker}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
import Confirm from "../../assets/svg/Confirm.svelte"
|
||||
import Not_found from "../../assets/svg/Not_found.svelte"
|
||||
import { twMerge } from "tailwind-merge"
|
||||
import Direction_gradient from "../../assets/svg/Direction_gradient.svelte"
|
||||
|
||||
/**
|
||||
* Renders a single icon.
|
||||
|
@ -100,6 +101,8 @@
|
|||
<HeartOutlineIcon class={clss} />
|
||||
{:else if icon === "confirm"}
|
||||
<Confirm class={clss} {color} />
|
||||
{:else if icon === "direction"}
|
||||
<Direction_gradient class={clss} {color} />
|
||||
{:else if icon === "not_found"}
|
||||
<Not_found class={twMerge(clss, "no-image-background")} {color} />
|
||||
{:else}
|
||||
|
|
|
@ -171,6 +171,7 @@ class PointRenderingLayer {
|
|||
store
|
||||
.map((tags) => this._config.rotationAlignment.GetRenderValue(tags).Subs(tags).txt)
|
||||
.addCallbackAndRun((pitchAligment) => marker.setRotationAlignment(<any>pitchAligment))
|
||||
|
||||
if (feature.geometry.type === "Point") {
|
||||
// When the tags get 'pinged', check that the location didn't change
|
||||
store.addCallbackAndRunD(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue