diff --git a/UI/Base/DragInvitation.svelte b/UI/Base/DragInvitation.svelte index 623c77d48..892ab1c41 100644 --- a/UI/Base/DragInvitation.svelte +++ b/UI/Base/DragInvitation.svelte @@ -11,9 +11,14 @@ function hide() { mainElem.style.visibility = "hidden" } + let initTime = Date.now() if (hideSignal) { onDestroy( hideSignal.addCallbackD(() => { + if(initTime + 1000 > Date.now()){ + console.log("Ignoring hide signal") + return + } console.log("Received hide signal") hide() return true @@ -27,8 +32,8 @@ } -
-
+
+
diff --git a/UI/BigComponents/NewPointLocationInput.svelte b/UI/BigComponents/NewPointLocationInput.svelte index 660fa14f7..52293a66a 100644 --- a/UI/BigComponents/NewPointLocationInput.svelte +++ b/UI/BigComponents/NewPointLocationInput.svelte @@ -15,6 +15,7 @@ import FeatureSourceMerger from "../../Logic/FeatureSource/Sources/FeatureSourceMerger" import LayerConfig from "../../Models/ThemeConfig/LayerConfig" import { Utils } from "../../Utils" + import {createEventDispatcher} from "svelte"; /** * An advanced location input, which has support to: @@ -43,6 +44,8 @@ lon: number lat: number }>(undefined) + + const dispatch = createEventDispatcher<{click: {lon: number, lat: number}}>() const xyz = Tiles.embedded_tile(coordinate.lat, coordinate.lon, 16) const map: UIEventSource = new UIEventSource(undefined) @@ -106,6 +109,7 @@ dispatch("click", data)} mapProperties={initialMapProperties} value={preciseLocation} initialCoordinate={coordinate} diff --git a/UI/InputElement/Helpers/LocationInput.svelte b/UI/InputElement/Helpers/LocationInput.svelte index dfd910f3a..0d43ff74b 100644 --- a/UI/InputElement/Helpers/LocationInput.svelte +++ b/UI/InputElement/Helpers/LocationInput.svelte @@ -1,91 +1,96 @@
-
- -
+
+ +
-
- -
+
+ +
- +
diff --git a/UI/Map/MapLibreAdaptor.ts b/UI/Map/MapLibreAdaptor.ts index c97571309..443d099b3 100644 --- a/UI/Map/MapLibreAdaptor.ts +++ b/UI/Map/MapLibreAdaptor.ts @@ -83,7 +83,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { // Workaround, 'ShowPointLayer' sets this flag return } - console.log(e) const lon = e.lngLat.lng const lat = e.lngLat.lat lastClickLocation.setData({ lon, lat }) @@ -321,10 +320,9 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { if (this.location.data === undefined) { this.location.setData({ lon: lng, lat }) } else if (!isSetup) { - const dt = this.location.data - dt.lon = map.getCenter().lng - dt.lat = map.getCenter().lat - this.location.ping() + const lon = map.getCenter().lng + const lat = map.getCenter().lat + this.location.setData({ lon, lat }) } this.zoom.setData(Math.round(map.getZoom() * 10) / 10) const bounds = map.getBounds() diff --git a/UI/Popup/AddNewPoint/AddNewPoint.svelte b/UI/Popup/AddNewPoint/AddNewPoint.svelte index 597d3538d..c1dbc1bd7 100644 --- a/UI/Popup/AddNewPoint/AddNewPoint.svelte +++ b/UI/Popup/AddNewPoint/AddNewPoint.svelte @@ -1,339 +1,353 @@ - - - - - {#if $isLoading} -
- - - -
- {:else if $zoom < Constants.minZoomLevelToAddNewPoint} -
- -
- {:else if selectedPreset === undefined} - - { + + + + + {#if $isLoading} +
+ + + +
+ {:else if $zoom < Constants.minZoomLevelToAddNewPoint} +
+ +
+ {:else if selectedPreset === undefined} + + { selectedPreset = event.detail }} - /> - {:else if !$layerIsDisplayed} - -
- - -
+ /> + {:else if !$layerIsDisplayed} + +
+ + +
-
- + > + + + - -
- {:else if $layerHasFilters} - -
- - -
-
- +
+ {:else if $layerHasFilters} + +
+ + +
+
+ - + -
- {:else if !confirmedCategory} - -

- -

+ > + + + +
+ {:else if !confirmedCategory} + +

+ +

- + - {#if selectedPreset.preset.description} - - {/if} - - {#if selectedPreset.preset.exampleImages} -

- {#if selectedPreset.preset.exampleImages.length === 1} - - {:else} - + {#if selectedPreset.preset.description} + {/if} -

- + + {#if selectedPreset.preset.exampleImages} +

+ {#if selectedPreset.preset.exampleImages.length === 1} + + {:else} + + {/if} +

+ {#each selectedPreset.preset.exampleImages as src} - + {/each} - {/if} - t.presetInfo.Subs({ tags })} - {state} - tags={new And(selectedPreset.preset.tags)} - /> + {/if} + t.presetInfo.Subs({ tags })} + {state} + tags={new And(selectedPreset.preset.tags)} + /> -
- (selectedPreset = undefined)} clss="w-full"> - - +
+ (selectedPreset = undefined)} clss="w-full"> + + - (confirmedCategory = true)} clss="primary w-full"> -
- - + (confirmedCategory = true)} clss="primary w-full"> +
+ + +
+
+ +
+
-
- -
-
-
- {:else if _globalFilter?.length > 0 && _globalFilter?.length > checkedOfGlobalFilters} - - { + {:else if _globalFilter?.length > 0 && _globalFilter?.length > checkedOfGlobalFilters} + + { checkedOfGlobalFilters = checkedOfGlobalFilters + 1 }} - > - - + + - - { + /> + + { globalFilter.setData([]) abort() }} - > - - - - {:else if !creating} -
-
- -
-
- state.guistate.backgroundLayerSelectionIsOpened.setData(true)} > - - -
-
-
- (selectedPreset = undefined)} clss="w-full"> - - + + + + {:else if !creating} +
+
+ {preciseInputIsTapped = true}} + value={preciseCoordinate} + snappedTo={snappedToObject} + {state} + {coordinate} + targetLayer={selectedPreset.layer} + snapToLayers={selectedPreset.preset.preciseInput.snapToLayers} + /> +
- -
- +
+ +
+ +
+
+
+ +
+ state.guistate.backgroundLayerSelectionIsOpened.setData(true)} + > + + +
-
-
- {:else} - Creating point... - {/if} +
+ (selectedPreset = undefined)} clss="w-full"> + + + + +
+ +
+
+
+ {:else} + Creating point... + {/if} diff --git a/public/css/index-tailwind-output.css b/public/css/index-tailwind-output.css index d155cc2a1..ab25c3b62 100644 --- a/public/css/index-tailwind-output.css +++ b/public/css/index-tailwind-output.css @@ -670,6 +670,10 @@ video { position: fixed; } +.\!fixed { + position: fixed !important; +} + .absolute { position: absolute; } @@ -795,10 +799,6 @@ video { margin: 1px; } -.m-12 { - margin: 3rem; -} - .mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; @@ -1242,6 +1242,27 @@ video { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; } +@-webkit-keyframes ping { + 75%, 100% { + -webkit-transform: scale(2); + transform: scale(2); + opacity: 0; + } +} + +@keyframes ping { + 75%, 100% { + -webkit-transform: scale(2); + transform: scale(2); + opacity: 0; + } +} + +.animate-ping { + -webkit-animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; + animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; +} + .cursor-pointer { cursor: pointer; } @@ -1730,11 +1751,6 @@ video { color: rgb(107 114 128 / var(--tw-text-opacity)); } -.text-green-600 { - --tw-text-opacity: 1; - color: rgb(22 163 74 / var(--tw-text-opacity)); -} - .underline { text-decoration-line: underline; }