Feature: add possibility to have a title when opening the popup as FloatOver

This commit is contained in:
Pieter Vander Vennet 2024-04-12 15:03:45 +02:00
parent 58dfb93818
commit 5424932f1a
4 changed files with 21 additions and 11 deletions

View file

@ -219,12 +219,13 @@ export interface LayerConfigJson {
*
* If set, open the selectedElementView in a floatOver instead of on the right.
*
* iftrue: show the infobox in the splashscreen floating over the entire UI
* iftrue: show the infobox in the splashscreen floating over the entire UI; hide the title bar
* iffalse: show the infobox in a sidebar on the right
* suggestions: return [{if: "value=title", then: "Show in a floatover and show the title bar"}]
* group: advanced
* default: sidebar
*/
popupInFloatover?: boolean
popupInFloatover?: boolean | "title" | string
/**
* Small icons shown next to the title.

View file

@ -66,7 +66,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: boolean
public readonly popupInFloatover
public readonly popupInFloatover: boolean | string
constructor(json: LayerConfigJson, context?: string, official: boolean = true) {
context = context + "." + json.id