Refactoring: More fixes to the themes
This commit is contained in:
parent
c260d16159
commit
4a6457f146
7 changed files with 29 additions and 37 deletions
|
@ -586,6 +586,7 @@ class WarnForUnsubstitutedLayersInTheme extends DesugaringStep<LayoutConfigJson>
|
|||
}
|
||||
|
||||
export class PrepareTheme extends Fuse<LayoutConfigJson> {
|
||||
private state: DesugaringContext
|
||||
constructor(
|
||||
state: DesugaringContext,
|
||||
options?: {
|
||||
|
@ -612,6 +613,7 @@ export class PrepareTheme extends Fuse<LayoutConfigJson> {
|
|||
new AddDependencyLayersToTheme(state),
|
||||
new AddImportLayers()
|
||||
)
|
||||
this.state = state
|
||||
}
|
||||
|
||||
convert(
|
||||
|
@ -619,6 +621,10 @@ export class PrepareTheme extends Fuse<LayoutConfigJson> {
|
|||
context: string
|
||||
): { result: LayoutConfigJson; errors: string[]; warnings: string[]; information: string[] } {
|
||||
const result = super.convert(json, context)
|
||||
if (this.state.publicLayers.size === 0) {
|
||||
// THis is a bootstrapping run, no need to already set this flag
|
||||
return result
|
||||
}
|
||||
|
||||
const needsNodeDatabase = result.result.layers?.some((l: LayerConfigJson) =>
|
||||
l.tagRenderings?.some((tr: TagRenderingConfigJson) =>
|
||||
|
|
|
@ -26,9 +26,14 @@ export class Translation extends BaseUIElement {
|
|||
if (!translations.hasOwnProperty(translationsKey)) {
|
||||
continue
|
||||
}
|
||||
if (translationsKey === "_context" || translationsKey === "_meta") {
|
||||
if (
|
||||
translationsKey === "_context" ||
|
||||
translationsKey === "_meta" ||
|
||||
translationsKey === "special"
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
count++
|
||||
if (typeof translations[translationsKey] != "string") {
|
||||
console.error(
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"source": "special",
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Your travelled path"
|
||||
"en": "Your travelled path",
|
||||
"nl": "Jouw traject"
|
||||
}
|
||||
},
|
||||
"shownByDefault": false,
|
||||
|
|
|
@ -542,9 +542,7 @@
|
|||
"color": "#888888"
|
||||
}
|
||||
],
|
||||
"title": {
|
||||
"render": "Service road"
|
||||
},
|
||||
"title": "Service road",
|
||||
"tagRenderings": []
|
||||
},
|
||||
{
|
||||
|
@ -759,9 +757,7 @@
|
|||
"location": [
|
||||
"point"
|
||||
],
|
||||
"icon": {
|
||||
"render": "./assets/svg/robot.svg"
|
||||
},
|
||||
"icon":"./assets/svg/robot.svg",
|
||||
"iconSize": "15,15"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
{
|
||||
"icon": "./assets/themes/onwheels/parking.svg",
|
||||
"anchor": "bottom",
|
||||
"iconSize": {
|
||||
"=iconSize": {
|
||||
"render": "20,20",
|
||||
"mappings": [
|
||||
{
|
||||
|
|
|
@ -191,12 +191,8 @@
|
|||
"minzoom": 19,
|
||||
"mapRendering+": [
|
||||
{
|
||||
"color": {
|
||||
"render": "#00f"
|
||||
},
|
||||
"width": {
|
||||
"render": "8"
|
||||
}
|
||||
"color": "#00f",
|
||||
"width": "8"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -214,12 +210,8 @@
|
|||
"minzoom": 19,
|
||||
"mapRendering+": [
|
||||
{
|
||||
"color": {
|
||||
"render": "yellow"
|
||||
},
|
||||
"width": {
|
||||
"render": "8"
|
||||
}
|
||||
"color": "yellow",
|
||||
"width": "8"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -109,9 +109,7 @@
|
|||
"minzoom": 14,
|
||||
"mapRendering": [
|
||||
{
|
||||
"icon": {
|
||||
"render": "./assets/themes/toerisme_vlaanderen/bench.svg"
|
||||
}
|
||||
"icon": "./assets/themes/toerisme_vlaanderen/bench.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -122,9 +120,7 @@
|
|||
"minzoom": 14,
|
||||
"mapRendering": [
|
||||
{
|
||||
"icon": {
|
||||
"render": "./assets/themes/toerisme_vlaanderen/picnic_table.svg"
|
||||
}
|
||||
"icon": "./assets/themes/toerisme_vlaanderen/picnic_table.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -135,9 +131,7 @@
|
|||
"minzoom": 14,
|
||||
"mapRendering": [
|
||||
{
|
||||
"icon": {
|
||||
"render": "./assets/themes/toerisme_vlaanderen/observation_tower.svg"
|
||||
}
|
||||
"icon": "./assets/themes/toerisme_vlaanderen/observation_tower.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -232,9 +226,7 @@
|
|||
"minzoom": 14,
|
||||
"mapRendering": [
|
||||
{
|
||||
"icon": {
|
||||
"render": "./assets/themes/toerisme_vlaanderen/playground.svg"
|
||||
}
|
||||
"icon": "./assets/themes/toerisme_vlaanderen/playground.svg"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue