From c5a3428d5c4278cd3163c8cac0366168cbdf6d97 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 28 Aug 2020 12:32:17 +0200 Subject: [PATCH 1/3] update changeset behaviour From b805f3aceca572114d4c084e37684a39405337b9 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 28 Aug 2020 12:46:09 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0649f85..bb6609c 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ In order to avoid lots of small changesets, a changeset is opened and kept open. Whenever a change is made -even adding a single tag- the change is uploaded into this changeset. If that fails, the changeset is probably closed and we open a new changeset. +Note that changesets are closed automatically after one hour of inactivity, so we don't have to worry about closing them. # Privacy From 8c264a2c56fb448a1f65346f102d9a20e1850720 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 31 Aug 2020 13:28:21 +0200 Subject: [PATCH 3/3] Fixed strayclickhandler --- Logic/Leaflet/StrayClickHandler.ts | 2 -- UI/SimpleAddUI.ts | 13 +++++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Logic/Leaflet/StrayClickHandler.ts b/Logic/Leaflet/StrayClickHandler.ts index 576c08a..30f0b16 100644 --- a/Logic/Leaflet/StrayClickHandler.ts +++ b/Logic/Leaflet/StrayClickHandler.ts @@ -1,6 +1,4 @@ -import {Basemap} from "./Basemap"; import L from "leaflet"; -import {UIEventSource} from "../UIEventSource"; import {UIElement} from "../../UI/UIElement"; import {State} from "../../State"; diff --git a/UI/SimpleAddUI.ts b/UI/SimpleAddUI.ts index b808aec..26f3806 100644 --- a/UI/SimpleAddUI.ts +++ b/UI/SimpleAddUI.ts @@ -8,15 +8,13 @@ import Locale from "./i18n/Locale"; import {State} from "../State"; import {UIEventSource} from "../Logic/UIEventSource"; -import {UserDetails} from "../Logic/Osm/OsmConnection"; -import {FixedUiElement} from "./Base/FixedUiElement"; import {Utils} from "../Utils"; /** * Asks to add a feature at the last clicked location, at least if zoom is sufficient */ export class SimpleAddUI extends UIElement { - private _addButtons: UIElement[]; + private readonly _addButtons: UIElement[]; private _loginButton : UIElement; @@ -44,7 +42,7 @@ export class SimpleAddUI extends UIElement { this._loginButton = Translations.t.general.add.pleaseLogin.Clone().onClick(() => State.state.osmConnection.AttemptLogin()); this._addButtons = []; - this.clss = "add-ui" + this.SetClass("add-ui"); const self = this; @@ -67,7 +65,7 @@ export class SimpleAddUI extends UIElement { const csCount = State.state.osmConnection.userDetails.data.csCount; let tagInfo = ""; if (csCount > State.userJourney.tagsVisibleAt) { - tagInfo = preset.tags.map(t => t.asHumanString(false)).join("&"); + tagInfo = preset.tags.map(t => t.asHumanString(false, true)).join("&"); tagInfo = `
${tagInfo}` } const button: UIElement = @@ -115,7 +113,6 @@ export class SimpleAddUI extends UIElement { } private CreatePoint(tags: Tag[], layerToAddTo: FilteredLayer) { - const self = this; return () => { const loc = State.state.bm.LastClickLocation.data; @@ -139,7 +136,7 @@ export class SimpleAddUI extends UIElement { let tagInfo = ""; const csCount = State.state.osmConnection.userDetails.data.csCount; if (csCount > State.userJourney.tagsVisibleAt) { - tagInfo = this._confirmPreset.data .tags.map(t => t.asHumanString(csCount > State.userJourney.tagsVisibleAndWikiLinked)).join("&"); + tagInfo = this._confirmPreset.data .tags.map(t => t.asHumanString(csCount > State.userJourney.tagsVisibleAndWikiLinked, true)).join("&"); tagInfo = `
More information about the preset: ${tagInfo}` } @@ -198,7 +195,7 @@ export class SimpleAddUI extends UIElement { } - var html = ""; + let html = ""; for (const button of this._addButtons) { html += button.Render(); }