forked from MapComplete/MapComplete
Port user settings
This commit is contained in:
parent
97aaa8e941
commit
8085079eff
30 changed files with 566 additions and 497 deletions
|
@ -123,7 +123,6 @@ export default class FilteredLayer {
|
|||
} else {
|
||||
properties = fieldstate
|
||||
}
|
||||
console.log("Building tagsspec with properties", properties)
|
||||
const missingKeys = option.fields
|
||||
.map((f) => f.name)
|
||||
.filter((key) => properties[key] === undefined)
|
||||
|
@ -182,7 +181,6 @@ export default class FilteredLayer {
|
|||
// We calculate the fields
|
||||
const fieldProperties = FilteredLayer.stringToFieldProperties(<string>state.data)
|
||||
const asTags = FilteredLayer.fieldsToTags(filter.options[0], fieldProperties)
|
||||
console.log("Current field properties:", state.data, fieldProperties, asTags)
|
||||
if (asTags) {
|
||||
needed.push(asTags)
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ export class MenuState {
|
|||
public readonly highlightedLayerInFilters: UIEventSource<string> = new UIEventSource<string>(
|
||||
undefined
|
||||
)
|
||||
public highlightedUserSetting: UIEventSource<string> = new UIEventSource<string>(undefined)
|
||||
constructor() {
|
||||
this.themeViewTabIndex = new UIEventSource(0)
|
||||
this.themeViewTab = this.themeViewTabIndex.sync(
|
||||
|
@ -57,6 +58,12 @@ export class MenuState {
|
|||
}
|
||||
}
|
||||
|
||||
public openUsersettings(highlightTagRendering?: string) {
|
||||
this.menuIsOpened.setData(true)
|
||||
this.menuViewTab.setData("settings")
|
||||
this.highlightedUserSetting.setData(highlightTagRendering)
|
||||
}
|
||||
|
||||
public closeAll() {
|
||||
this.menuIsOpened.setData(false)
|
||||
this.themeIsOpened.setData(false)
|
||||
|
|
|
@ -805,7 +805,13 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
|
|||
const param = special[arg.name]
|
||||
if (param === undefined) {
|
||||
errors.push(
|
||||
`At ${context}: Obligated parameter '${arg.name}' in special rendering of type ${vis.funcName} not found.\n${arg.doc}`
|
||||
`At ${context}: Obligated parameter '${
|
||||
arg.name
|
||||
}' in special rendering of type ${
|
||||
vis.funcName
|
||||
} not found.\n The full special rendering specification is: '${JSON.stringify(
|
||||
input
|
||||
)}'\n ${arg.name}: ${arg.doc}`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
),
|
||||
osmConfiguration: <"osm" | "osm-test">this.featureSwitches.featureSwitchApiURL.data,
|
||||
})
|
||||
this.userRelatedState = new UserRelatedState(this.osmConnection, layout?.language)
|
||||
this.userRelatedState = new UserRelatedState(this.osmConnection, layout?.language, layout)
|
||||
this.selectedElement = new UIEventSource<Feature | undefined>(undefined, "Selected element")
|
||||
this.selectedLayer = new UIEventSource<LayerConfig>(undefined, "Selected layer")
|
||||
this.geolocation = new GeoLocationHandler(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue