From 747adfda85b048061efde0cd82c25d62441ba964 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 18 Mar 2021 13:45:57 +0100 Subject: [PATCH] Fix wordbreak of simpleAddUI on chrome --- Customizations/JSON/LayoutConfigJson.ts | 3 ++- UI/BigComponents/SimpleAddUI.ts | 9 +++++---- assets/themes/speelplekken/speelplekken.json | 4 +--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Customizations/JSON/LayoutConfigJson.ts b/Customizations/JSON/LayoutConfigJson.ts index 87e250b..65f4150 100644 --- a/Customizations/JSON/LayoutConfigJson.ts +++ b/Customizations/JSON/LayoutConfigJson.ts @@ -74,7 +74,8 @@ export interface LayoutConfigJson { /** * Link to a 'social image' which is included as og:image-tag on official themes. - * Usefull to share the theme on social media + * Useful to share the theme on social media. + * See https://www.h3xed.com/web-and-internet/how-to-use-og-image-meta-tag-facebook-reddit for more information */ socialImage?: string; diff --git a/UI/BigComponents/SimpleAddUI.ts b/UI/BigComponents/SimpleAddUI.ts index 6d3b095..f9556ab 100644 --- a/UI/BigComponents/SimpleAddUI.ts +++ b/UI/BigComponents/SimpleAddUI.ts @@ -141,7 +141,7 @@ export default class SimpleAddUI extends UIElement { new Combine([ "", Translations.t.general.add.confirmButton.Subs({category: preset.name}), - ""])); + ""])).SetClass("break-words"); confirmButton.onClick(this.CreatePoint(preset.tags)); if (!this._confirmPreset.data.layerToAddTo.isDisplayed.data) { @@ -183,10 +183,10 @@ export default class SimpleAddUI extends UIElement { let icon: UIElement = new FixedUiElement(layer.layerDef.GenerateLeafletStyle(new UIEventSource(tags), false).icon.html.Render()).SetClass("simple-add-ui-icon"); const csCount = State.state.osmConnection.userDetails.data.csCount; - let tagInfo = ""; + let tagInfo = undefined; if (csCount > Constants.userJourney.tagsVisibleAt) { - tagInfo = preset.tags.map(t => t.asHumanString(false, true)).join("&"); - tagInfo = `
${tagInfo}` + const presets = preset.tags.map(t => new Combine ([t.asHumanString(false, true), " "]).SetClass("subtle break-words") ) + tagInfo = new Combine(presets) } const button: UIElement = new SubtleButton( @@ -196,6 +196,7 @@ export default class SimpleAddUI extends UIElement { preset.title, "", preset.description !== undefined ? new Combine(["
", preset.description.FirstSentence()]) : "", + "
", tagInfo ]) ).onClick( diff --git a/assets/themes/speelplekken/speelplekken.json b/assets/themes/speelplekken/speelplekken.json index ae6653f..47372d1 100644 --- a/assets/themes/speelplekken/speelplekken.json +++ b/assets/themes/speelplekken/speelplekken.json @@ -27,9 +27,7 @@ "play_forest", "playground", "sport_pitch", - "slow_roads", - "drinking_water", - "toilets" + "slow_roads" ], "roamingRenderings": [] } \ No newline at end of file