forked from MapComplete/MapComplete
Merge develop
This commit is contained in:
commit
c8bd412476
49 changed files with 1342 additions and 977 deletions
|
@ -49,6 +49,7 @@ export default class LayerConfig {
|
|||
wayHandling: number;
|
||||
public readonly units: Unit[];
|
||||
public readonly deletion: DeleteConfig | null;
|
||||
public readonly allowSplit: boolean
|
||||
|
||||
presets: {
|
||||
title: Translation,
|
||||
|
@ -70,6 +71,7 @@ export default class LayerConfig {
|
|||
context = context + "." + json.id;
|
||||
const self = this;
|
||||
this.id = json.id;
|
||||
this.allowSplit = json.allowSplit ?? false;
|
||||
this.name = Translations.T(json.name, context + ".name");
|
||||
|
||||
if (json.description !== undefined) {
|
||||
|
@ -373,8 +375,7 @@ export default class LayerConfig {
|
|||
|
||||
public GenerateLeafletStyle(
|
||||
tags: UIEventSource<any>,
|
||||
clickable: boolean,
|
||||
widthHeight = "100%"
|
||||
clickable: boolean
|
||||
): {
|
||||
icon: {
|
||||
html: BaseUIElement;
|
||||
|
|
|
@ -298,4 +298,9 @@ export interface LayerConfigJson {
|
|||
*/
|
||||
deletion?: boolean | DeleteConfigJson
|
||||
|
||||
/**
|
||||
* IF set, a 'split this road' button is shown
|
||||
*/
|
||||
allowSplit?: boolean
|
||||
|
||||
}
|
|
@ -66,7 +66,7 @@ export default class LayoutConfig {
|
|||
this.language = json.language;
|
||||
}
|
||||
if (this.language.length == 0) {
|
||||
throw "No languages defined. Define at least one language"
|
||||
throw `No languages defined. Define at least one language. (${context}.languages)`
|
||||
}
|
||||
if (json.title === undefined) {
|
||||
throw "Title not defined in " + this.id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue