Fix wordbreak of simpleAddUI on chrome

This commit is contained in:
pietervdvn 2021-03-18 13:45:57 +01:00
parent 07a8746a70
commit 747adfda85
3 changed files with 8 additions and 8 deletions

View file

@ -74,7 +74,8 @@ export interface LayoutConfigJson {
/** /**
* Link to a 'social image' which is included as og:image-tag on official themes. * 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; socialImage?: string;

View file

@ -141,7 +141,7 @@ export default class SimpleAddUI extends UIElement {
new Combine([ new Combine([
"<b>", "<b>",
Translations.t.general.add.confirmButton.Subs({category: preset.name}), Translations.t.general.add.confirmButton.Subs({category: preset.name}),
"</b>"])); "</b>"])).SetClass("break-words");
confirmButton.onClick(this.CreatePoint(preset.tags)); confirmButton.onClick(this.CreatePoint(preset.tags));
if (!this._confirmPreset.data.layerToAddTo.isDisplayed.data) { 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<any>(tags), false).icon.html.Render()).SetClass("simple-add-ui-icon"); let icon: UIElement = new FixedUiElement(layer.layerDef.GenerateLeafletStyle(new UIEventSource<any>(tags), false).icon.html.Render()).SetClass("simple-add-ui-icon");
const csCount = State.state.osmConnection.userDetails.data.csCount; const csCount = State.state.osmConnection.userDetails.data.csCount;
let tagInfo = ""; let tagInfo = undefined;
if (csCount > Constants.userJourney.tagsVisibleAt) { if (csCount > Constants.userJourney.tagsVisibleAt) {
tagInfo = preset.tags.map(t => t.asHumanString(false, true)).join("&"); const presets = preset.tags.map(t => new Combine ([t.asHumanString(false, true), " "]).SetClass("subtle break-words") )
tagInfo = `<br/><span class='subtle'>${tagInfo}</span>` tagInfo = new Combine(presets)
} }
const button: UIElement = const button: UIElement =
new SubtleButton( new SubtleButton(
@ -196,6 +196,7 @@ export default class SimpleAddUI extends UIElement {
preset.title, preset.title,
"</b>", "</b>",
preset.description !== undefined ? new Combine(["<br/>", preset.description.FirstSentence()]) : "", preset.description !== undefined ? new Combine(["<br/>", preset.description.FirstSentence()]) : "",
"<br/>",
tagInfo tagInfo
]) ])
).onClick( ).onClick(

View file

@ -27,9 +27,7 @@
"play_forest", "play_forest",
"playground", "playground",
"sport_pitch", "sport_pitch",
"slow_roads", "slow_roads"
"drinking_water",
"toilets"
], ],
"roamingRenderings": [] "roamingRenderings": []
} }