forked from MapComplete/MapComplete
Further development of split-road feature; refactoring of change-handling
This commit is contained in:
parent
dc4cdda3b5
commit
96ecded0b9
37 changed files with 967 additions and 568 deletions
|
@ -13,6 +13,7 @@ import SharedTagRenderings from "../../Customizations/SharedTagRenderings";
|
|||
import BaseUIElement from "../BaseUIElement";
|
||||
import {VariableUiElement} from "../Base/VariableUIElement";
|
||||
import DeleteWizard from "./DeleteWizard";
|
||||
import SplitRoadWizard from "./SplitRoadWizard";
|
||||
|
||||
export default class FeatureInfoBox extends ScrollableFullScreen {
|
||||
|
||||
|
@ -66,10 +67,6 @@ export default class FeatureInfoBox extends ScrollableFullScreen {
|
|||
renderings.push(questionBox);
|
||||
}
|
||||
|
||||
const hasMinimap = layerConfig.tagRenderings.some(tr => tr.hasMinimap())
|
||||
if (!hasMinimap) {
|
||||
renderings.push(new TagRenderingAnswer(tags, SharedTagRenderings.SharedTagRendering.get("minimap")))
|
||||
}
|
||||
|
||||
if (layerConfig.deletion) {
|
||||
renderings.push(
|
||||
|
@ -81,6 +78,19 @@ export default class FeatureInfoBox extends ScrollableFullScreen {
|
|||
))
|
||||
}
|
||||
|
||||
if (layerConfig.allowSplit) {
|
||||
renderings.push(
|
||||
new VariableUiElement(tags.map(tags => tags.id).map(id =>
|
||||
new SplitRoadWizard(id))
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
const hasMinimap = layerConfig.tagRenderings.some(tr => tr.hasMinimap())
|
||||
if (!hasMinimap) {
|
||||
renderings.push(new TagRenderingAnswer(tags, SharedTagRenderings.SharedTagRendering.get("minimap")))
|
||||
}
|
||||
|
||||
renderings.push(
|
||||
new VariableUiElement(
|
||||
State.state.osmConnection.userDetails
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue