forked from MapComplete/MapComplete
Style: Allow a layer to open the popup-view in a floatover
This commit is contained in:
parent
377c411143
commit
65a4303dd6
4 changed files with 16 additions and 1 deletions
|
@ -399,4 +399,9 @@ export interface LayerConfigJson {
|
|||
* no-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering
|
||||
*/
|
||||
"#"?: string | "no-question-hint-check"
|
||||
|
||||
/**
|
||||
* If set, open the selectedElementView in a floatOver instead of on the right
|
||||
*/
|
||||
popupInFloatover?: boolean
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
public readonly syncSelection: typeof LayerConfig.syncSelectionAllowed[number] // this is a trick to conver a constant array of strings into a type union of these values
|
||||
|
||||
public readonly _needsFullNodeDatabase = false
|
||||
public readonly popupInFloatover
|
||||
|
||||
constructor(json: LayerConfigJson, context?: string, official: boolean = true) {
|
||||
context = context + "." + json.id
|
||||
|
@ -414,6 +415,8 @@ export default class LayerConfig extends WithContextLoader {
|
|||
": showIf. Did you mean 'isShown' instead?"
|
||||
)
|
||||
}
|
||||
this.popupInFloatover = json.popupInFloatover ?? false
|
||||
|
||||
}
|
||||
|
||||
public defaultIcon(): BaseUIElement | undefined {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue