Merge branch 'develop' into feature/professional
This commit is contained in:
commit
9a20451e81
41 changed files with 2130 additions and 2181 deletions
|
@ -197,6 +197,7 @@ export default class BackgroundMapSwitch extends Combine {
|
|||
|
||||
super(buttons)
|
||||
this.SetClass("flex")
|
||||
currentBackground.addCallbackAndRun(bg => console.trace("Current background is", bg.id))
|
||||
}
|
||||
|
||||
}
|
|
@ -22,6 +22,7 @@ import {Changes} from "../../Logic/Osm/Changes";
|
|||
import FeaturePipeline from "../../Logic/FeatureSource/FeaturePipeline";
|
||||
import {ElementStorage} from "../../Logic/ElementStorage";
|
||||
import ConfirmLocationOfPoint from "../NewPoint/ConfirmLocationOfPoint";
|
||||
import BaseLayer from "../../Models/BaseLayer";
|
||||
|
||||
/*
|
||||
* The SimpleAddUI is a single panel, which can have multiple states:
|
||||
|
@ -52,6 +53,7 @@ export default class SimpleAddUI extends Toggle {
|
|||
locationControl: UIEventSource<Loc>,
|
||||
filteredLayers: UIEventSource<FilteredLayer[]>,
|
||||
featureSwitchFilter: UIEventSource<boolean>,
|
||||
backgroundLayer: UIEventSource<BaseLayer>
|
||||
}) {
|
||||
const loginButton = new SubtleButton(Svg.osm_logo_ui(), Translations.t.general.add.pleaseLogin.Clone())
|
||||
.onClick(() => state.osmConnection.AttemptLogin());
|
||||
|
|
|
@ -12,6 +12,7 @@ import Translations from "../i18n/Translations";
|
|||
import Svg from "../../Svg";
|
||||
import Toggle from "../Input/Toggle";
|
||||
import SimpleAddUI, {PresetInfo} from "../BigComponents/SimpleAddUI";
|
||||
import BaseLayer from "../../Models/BaseLayer";
|
||||
|
||||
export default class ConfirmLocationOfPoint extends Combine {
|
||||
|
||||
|
@ -19,7 +20,8 @@ export default class ConfirmLocationOfPoint extends Combine {
|
|||
constructor(
|
||||
state: {
|
||||
osmConnection: OsmConnection,
|
||||
featurePipeline: FeaturePipeline
|
||||
featurePipeline: FeaturePipeline,
|
||||
backgroundLayer?: UIEventSource<BaseLayer>
|
||||
},
|
||||
filterViewIsOpened: UIEventSource<boolean>,
|
||||
preset: PresetInfo,
|
||||
|
@ -35,9 +37,11 @@ export default class ConfirmLocationOfPoint extends Combine {
|
|||
const zloc = {...loc, zoom: 19}
|
||||
const locationSrc = new UIEventSource(zloc);
|
||||
|
||||
let backgroundLayer = undefined;
|
||||
let backgroundLayer = new UIEventSource(state?.backgroundLayer?.data ?? AvailableBaseLayers.osmCarto);
|
||||
if (preset.preciseInput.preferredBackground) {
|
||||
backgroundLayer = AvailableBaseLayers.SelectBestLayerAccordingTo(locationSrc, new UIEventSource<string | string[]>(preset.preciseInput.preferredBackground))
|
||||
const defaultBackground = AvailableBaseLayers.SelectBestLayerAccordingTo(locationSrc, new UIEventSource<string | string[]>(preset.preciseInput.preferredBackground));
|
||||
// Note that we _break the link_ here, as the minimap will take care of the switching!
|
||||
backgroundLayer.setData(defaultBackground.data)
|
||||
}
|
||||
|
||||
let snapToFeatures: UIEventSource<{ feature: any }[]> = undefined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue