Add summary layer

This commit is contained in:
Pieter Vander Vennet 2024-02-15 17:39:59 +01:00
parent 5b318236bf
commit 74fb4bd5d1
19 changed files with 533 additions and 88 deletions

View file

@ -35,7 +35,6 @@
async function clicked() {
isExporting = true
const gpsLayer = state.layerState.filteredLayers.get(<PriviligedLayerType>"gps_location")
state.lastClickObject.features.setData([])
state.userRelatedState.preferencesAsTags.data["__showTimeSensitiveIcons"] = "no"
state.userRelatedState.preferencesAsTags.ping()
const gpsIsDisplayed = gpsLayer.isDisplayed.data

View file

@ -89,7 +89,6 @@
state.selectedElement.setData(undefined)
// When aborted, we force the contributors to place the pin _again_
// This is because there might be a nearby object that was disabled; this forces them to re-evaluate the map
state.lastClickObject.features.setData([])
preciseInputIsTapped = false
}

View file

@ -84,7 +84,6 @@ export interface SpecialVisualizationState {
readonly preferencesAsTags: UIEventSource<Record<string, string>>
readonly language: UIEventSource<string>
}
readonly lastClickObject: WritableFeatureSource
readonly availableLayers: Store<RasterLayerPolygon[]>

View file

@ -96,6 +96,11 @@
if (element.properties.id.startsWith("current_view")) {
return currentViewLayer
}
console.log(">>> selected:", element)
if(element.properties.id === "new_point_dialog"){
console.log(">>> searching last_click layer", layout)
return layout.layers.find(l => l.id === "last_click")
}
if(element.properties.id === "location_track"){
return layout.layers.find(l => l.id === "gps_track")
}
@ -259,7 +264,7 @@
<div class="flex w-full items-end justify-between px-4">
<div class="flex flex-col">
<If condition={featureSwitches.featureSwitchEnableLogin}>
{#if state.lastClickObject.hasPresets || state.lastClickObject.hasNoteLayer}
{#if state.layout.hasPresets() || state.layout.hasNoteLayer()}
<button
class="pointer-events-auto w-fit"
on:click={() => {
@ -267,7 +272,7 @@
}}
on:keydown={forwardEventToMap}
>
{#if state.lastClickObject.hasPresets}
{#if state.layout.hasPresets()}
<Tr t={Translations.t.general.add.title} />
{:else}
<Tr t={Translations.t.notes.addAComment} />