UX: attempt to decrease dissappearing keyboard (#2365)

This commit is contained in:
Pieter Vander Vennet 2025-04-04 02:25:41 +02:00
parent a4128e446e
commit 32e2176ecd

View file

@ -2,7 +2,7 @@
* Applies geometry changes from 'Changes' onto every feature of a featureSource * Applies geometry changes from 'Changes' onto every feature of a featureSource
*/ */
import { Changes } from "../../Osm/Changes" import { Changes } from "../../Osm/Changes"
import { UIEventSource } from "../../UIEventSource" import { Stores, UIEventSource } from "../../UIEventSource"
import { FeatureSource, IndexedFeatureSource } from "../FeatureSource" import { FeatureSource, IndexedFeatureSource } from "../FeatureSource"
import { ChangeDescription, ChangeDescriptionTools } from "../../Osm/Actions/ChangeDescription" import { ChangeDescription, ChangeDescriptionTools } from "../../Osm/Actions/ChangeDescription"
import { Feature } from "geojson" import { Feature } from "geojson"
@ -19,10 +19,9 @@ export default class ChangeGeometryApplicator implements FeatureSource {
this.features = new UIEventSource<Feature[]>(undefined) this.features = new UIEventSource<Feature[]>(undefined)
const self = this source.features.addCallbackAndRunD(() => this.update())
source.features.addCallbackAndRunD((_) => self.update())
changes.allChanges.addCallbackAndRunD((_) => self.update()) Stores.ListStabilized(changes.allChanges).addCallbackAndRunD(() => this.update())
} }
private update() { private update() {
@ -65,7 +64,7 @@ export default class ChangeGeometryApplicator implements FeatureSource {
// Allright! We have a feature to rewrite! // Allright! We have a feature to rewrite!
const copy = { const copy = {
...feature, ...feature
} }
// We only apply the last change as that one'll have the latest geometry // We only apply the last change as that one'll have the latest geometry
const change = changesForFeature[changesForFeature.length - 1] const change = changesForFeature[changesForFeature.length - 1]