forked from MapComplete/MapComplete
UX: add 'show nearby picture' in new point popup
This commit is contained in:
parent
d56cf56511
commit
dad9bb1349
8 changed files with 37 additions and 24 deletions
|
|
@ -187,7 +187,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
)
|
||||
}
|
||||
if (pr.snapToLayer !== undefined) {
|
||||
let snapToLayers = pr.snapToLayer
|
||||
const snapToLayers = pr.snapToLayer
|
||||
preciseInput = {
|
||||
snapToLayers,
|
||||
maxSnapDistance: pr.maxSnapDistance ?? 10,
|
||||
|
|
@ -277,8 +277,9 @@ export default class LayerConfig extends WithContextLoader {
|
|||
tr["rewrite"] === undefined
|
||||
) ?? []
|
||||
if (missingIds?.length > 0 && official) {
|
||||
console.error("Some tagRenderings of", this.id, "are missing an id:", missingIds)
|
||||
throw "Missing ids in tagrenderings"
|
||||
const msg = `Context: ${context}; Some tagRenderings of ${this.id} are missing an id: ${missingIds.map(x => JSON.stringify(x)).join(", ")} `
|
||||
console.error(msg)
|
||||
throw msg
|
||||
}
|
||||
|
||||
this.tagRenderings = (Utils.NoNull(json.tagRenderings) ?? []).map(
|
||||
|
|
|
|||
|
|
@ -144,9 +144,6 @@ export default class TagRenderingConfig {
|
|||
this.classes = json.classes ?? []
|
||||
}
|
||||
this.classes = [].concat(...this.classes.map((cl) => cl.split(" ")))
|
||||
if (this.classes.length === 0) {
|
||||
this.classes = undefined
|
||||
}
|
||||
|
||||
this.render = Translations.T(<any>json.render, translationKey + ".render")
|
||||
this.question = Translations.T(json.question, translationKey + ".question")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue