Class: UILeftPanel

UILeftPanel

Represents a left-side UI panel component. Provides methods to show, hide, toggle, and manage panel content. Panels are exclusive by default (opening one closes others).

new UILeftPanel(id, mapContainer)

UIMap/UIDisplay/UILeftPanel/index.ts, line 60

Creates a new UILeftPanel instance or returns an existing one with the same ID.

Name Type Description
id string

Unique identifier for the panel.

mapContainer HTMLElement

The container element where the panel will be appended.

Methods

close()

UIMap/UIDisplay/UILeftPanel/index.ts, line 152

Closes this panel.

getId(){string}

UIMap/UIDisplay/UILeftPanel/index.ts, line 197

Gets the unique ID of the panel.

Returns:
Type Description
string The panel ID.

isOpened(){boolean}

UIMap/UIDisplay/UILeftPanel/index.ts, line 189

Checks if the panel is currently open.

Returns:
Type Description
boolean True if the panel is open, otherwise false.

remove()

UIMap/UIDisplay/UILeftPanel/index.ts, line 176

Removes this panel from the DOM and the registry.

setTitle(title)

UIMap/UIDisplay/UILeftPanel/index.ts, line 206

Permite cambiar el título del panel manualmente. Activa la marca de customTranslation.

Name Type Description
title string

Texto del título a mostrar.

show(content){HTMLElement}

UIMap/UIDisplay/UILeftPanel/index.ts, line 135

Displays the panel with the given content. Closes all other panels, if any of them is open

Name Type Default Description
content string | HTMLElement "" optional

HTML string or HTMLElement to display inside the panel.

Returns:
Type Description
HTMLElement The panel element.

toggle(content)

UIMap/UIDisplay/UILeftPanel/index.ts, line 165

Toggles the panel's visibility. If closed, opens it with optional content (and closes others). If open, closes it.

Name Type Description
content string | HTMLElement optional

Optional content to show when opening.

updateTranslations()

UIMap/UIDisplay/UILeftPanel/index.ts, line 220

Actualiza el título del panel en base a las traducciones, siempre que no se haya establecido manualmente.