Studio: add more metainformation to layerConfig.json

This commit is contained in:
Pieter Vander Vennet 2023-06-18 00:44:57 +02:00
parent 069767b9c7
commit 223acee29c
17 changed files with 7110 additions and 927 deletions

View file

@ -1,8 +1,19 @@
import { OsmConnection } from "../../Logic/Osm/OsmConnection"
import { ConfigMeta } from "./configMeta"
export default class EditLayerState {
public readonly osmConnection: OsmConnection
constructor() {
public readonly schema: ConfigMeta[]
constructor(schema: ConfigMeta[]) {
this.schema = schema
this.osmConnection = new OsmConnection({})
}
public getSchemaStartingWith(path: string[]) {
return this.schema.filter(
(sch) =>
!path.some((part, i) => !(sch.path.length > path.length && sch.path[i] === part))
)
}
}