forked from MapComplete/MapComplete
More fixes
This commit is contained in:
parent
2ae380f1a6
commit
9a73ae4c47
21 changed files with 203 additions and 148 deletions
|
@ -8,15 +8,13 @@ import State from "../../State";
|
|||
import Svg from "../../Svg";
|
||||
import Toggle from "../Input/Toggle";
|
||||
import BaseUIElement from "../BaseUIElement";
|
||||
import {FixedUiElement} from "../Base/FixedUiElement";
|
||||
|
||||
export default class EditableTagRendering extends Toggle {
|
||||
|
||||
constructor(tags: UIEventSource<any>,
|
||||
configuration: TagRenderingConfig) {
|
||||
|
||||
const editMode = new UIEventSource<boolean>(false);
|
||||
|
||||
configuration: TagRenderingConfig,
|
||||
editMode = new UIEventSource<boolean>(false)
|
||||
) {
|
||||
const answer: BaseUIElement = new TagRenderingAnswer(tags, configuration)
|
||||
answer.SetClass("w-full")
|
||||
let rendering = answer;
|
||||
|
|
|
@ -26,8 +26,8 @@ export class SaveButton extends Toggle {
|
|||
isSaveable
|
||||
)
|
||||
super(
|
||||
save
|
||||
, pleaseLogin,
|
||||
save,
|
||||
pleaseLogin,
|
||||
osmConnection?.userDetails?.map(userDetails => userDetails.loggedIn) ?? new UIEventSource<any>(false)
|
||||
)
|
||||
|
||||
|
|
|
@ -71,7 +71,8 @@ export default class TagRenderingQuestion extends UIElement {
|
|||
}
|
||||
|
||||
|
||||
this._saveButton = new SaveButton(this._inputElement.GetValue(), State.state?.osmConnection)
|
||||
this._saveButton = new SaveButton(this._inputElement.GetValue(),
|
||||
State.state?.osmConnection)
|
||||
.onClick(save)
|
||||
|
||||
|
||||
|
@ -92,7 +93,7 @@ export default class TagRenderingQuestion extends UIElement {
|
|||
return tags.asHumanString(true, true, self._tags.data);
|
||||
}
|
||||
)
|
||||
).SetClass("block")
|
||||
).SetClass("block break-all")
|
||||
|
||||
|
||||
|
||||
|
@ -156,7 +157,9 @@ export default class TagRenderingQuestion extends UIElement {
|
|||
oppositeTags.push(notSelected);
|
||||
}
|
||||
tags.push(TagUtils.FlattenMultiAnswer(oppositeTags));
|
||||
return TagUtils.FlattenMultiAnswer(tags);
|
||||
const actualTags = TagUtils.FlattenMultiAnswer(tags);
|
||||
console.log("Converted ", indices.join(","), "into", actualTags.asHumanString(false, false, {}), "with elems", elements)
|
||||
return actualTags;
|
||||
},
|
||||
(tags: TagsFilter) => {
|
||||
// {key --> values[]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue