Skip to content

ui/panels/left/MapControlsPanel

Classes

MapControlsPanel

Defined in: ui/panels/left/MapControlsPanel.ts:17

BasePanel - Abstract base class for all UI panels Provides common functionality for panel management including: - DOM element management - Event listener cleanup - Lifecycle methods - Common panel operations (collapse/expand)

Extends

Constructors

Constructor
new MapControlsPanel(): MapControlsPanel;

Defined in: ui/panels/left/MapControlsPanel.ts:25

Returns

MapControlsPanel

Overrides

BasePanel.constructor

Properties

panelElement
protected panelElement: HTMLElement | null = null;

Defined in: ui/panels/BasePanel.ts:14

Inherited from

BasePanel.panelElement

panelContent
protected panelContent: HTMLElement | null = null;

Defined in: ui/panels/BasePanel.ts:15

Inherited from

BasePanel.panelContent

collapseButton
protected collapseButton: HTMLElement | null = null;

Defined in: ui/panels/BasePanel.ts:16

Inherited from

BasePanel.collapseButton

listeners
protected listeners: ListenerRegistry;

Defined in: ui/panels/BasePanel.ts:17

Inherited from

BasePanel.listeners

panelSelector
protected panelSelector: string;

Defined in: ui/panels/BasePanel.ts:25

CSS selector for the panel container

Inherited from

BasePanel.panelSelector

contentId?
protected optional contentId?: string;

Defined in: ui/panels/BasePanel.ts:26

ID of the panel content element (optional)

Inherited from

BasePanel.contentId

Methods

init()
init(): void;

Defined in: ui/panels/BasePanel.ts:33

Initialize the panel Must be called after DOM is ready

Returns

void

Inherited from

BasePanel.init

toggleCollapse()
protected toggleCollapse(): void;

Defined in: ui/panels/BasePanel.ts:73

Toggle panel collapse state

Returns

void

Inherited from

BasePanel.toggleCollapse

addEventListener()
protected addEventListener(
   element, 
   event, 
   handler): void;

Defined in: ui/panels/BasePanel.ts:87

Add an event listener and track it for cleanup

Parameters
element

HTMLElement

event

string

handler

EventListener

Returns

void

Inherited from

BasePanel.addEventListener

bindEvent()
protected bindEvent(
   id, 
   event, 
   handler): HTMLElement | null;

Defined in: ui/panels/BasePanel.ts:100

Attach a tracked event listener to an element by ID, with the standard warn-if-missing handling that panels used to copy-paste. Returns the element so callers can chain further setup.

Parameters
id

string

event

string

handler

EventListener

Returns

HTMLElement | null

Inherited from

BasePanel.bindEvent

bindClick()
protected bindClick(id, handler): HTMLElement | null;

Defined in: ui/panels/BasePanel.ts:117

Attach a tracked click handler to an element by ID.

Parameters
id

string

handler

() => void

Returns

HTMLElement | null

Inherited from

BasePanel.bindClick

bindInput()
protected bindInput(id, handler): HTMLElement | null;

Defined in: ui/panels/BasePanel.ts:124

Attach a tracked 'input' handler that receives the input's value.

Parameters
id

string

handler

(value) => void

Returns

HTMLElement | null

Inherited from

BasePanel.bindInput

bindChange()
protected bindChange(id, handler): HTMLElement | null;

Defined in: ui/panels/BasePanel.ts:133

Attach a tracked 'change' handler that receives the select/input value.

Parameters
id

string

handler

(value) => void

Returns

HTMLElement | null

Inherited from

BasePanel.bindChange

bindCheckbox()
protected bindCheckbox(id, handler): HTMLElement | null;

Defined in: ui/panels/BasePanel.ts:143

Attach a tracked 'change' handler to a checkbox that receives its checked state.

Parameters
id

string

handler

(checked) => void

Returns

HTMLElement | null

Inherited from

BasePanel.bindCheckbox

setInputValue()
protected setInputValue(id, value): void;

Defined in: ui/panels/BasePanel.ts:152

Set an input/select value by element ID, ignoring missing elements.

Parameters
id

string

value

string | number

Returns

void

Inherited from

BasePanel.setInputValue

setChecked()
protected setChecked(id, checked): void;

Defined in: ui/panels/BasePanel.ts:160

Set a checkbox's checked state by element ID, ignoring missing elements.

Parameters
id

string

checked

boolean

Returns

void

Inherited from

BasePanel.setChecked

setText()
protected setText(id, text): void;

Defined in: ui/panels/BasePanel.ts:168

Set an element's text content by element ID, ignoring missing elements.

Parameters
id

string

text

string

Returns

void

Inherited from

BasePanel.setText

getElement()
protected getElement(selector): HTMLElement | null;

Defined in: ui/panels/BasePanel.ts:176

Get an element within the panel

Parameters
selector

string

Returns

HTMLElement | null

Inherited from

BasePanel.getElement

getElementById()
protected getElementById(id): HTMLElement | null;

Defined in: ui/panels/BasePanel.ts:184

Get an element by ID within the panel

Parameters
id

string

Returns

HTMLElement | null

Inherited from

BasePanel.getElementById

trackSubscription()
protected trackSubscription(unsubscribe): void;

Defined in: ui/panels/BasePanel.ts:193

Track an unsubscribe function (e.g. from StateManager.subscribe) so the subscription is released in destroy(). Without this, destroyed panels keep reacting to state changes on detached DOM.

Parameters
unsubscribe

() => void

Returns

void

Inherited from

BasePanel.trackSubscription

destroy()
destroy(): void;

Defined in: ui/panels/BasePanel.ts:205

Clean up panel resources

Returns

void

Inherited from

BasePanel.destroy

onDestroy()
protected onDestroy(): void;

Defined in: ui/panels/BasePanel.ts:215

Subclasses override this to perform custom cleanup

Returns

void

Inherited from

BasePanel.onDestroy

show()
show(): void;

Defined in: ui/panels/BasePanel.ts:222

Show the panel

Returns

void

Inherited from

BasePanel.show

hide()
hide(): void;

Defined in: ui/panels/BasePanel.ts:231

Hide the panel

Returns

void

Inherited from

BasePanel.hide

isVisible()
isVisible(): boolean;

Defined in: ui/panels/BasePanel.ts:240

Check if panel is visible

Returns

boolean

Inherited from

BasePanel.isVisible

onInit()
protected onInit(): void;

Defined in: ui/panels/left/MapControlsPanel.ts:29

Subclasses override this to perform custom initialization

Returns

void

Overrides

BasePanel.onInit

setMapDisplay()
setMapDisplay(mapDisplay): void;

Defined in: ui/panels/left/MapControlsPanel.ts:94

Set the MapDisplay instance for this panel

Parameters
mapDisplay

MapDisplay

Returns

void

setupMapEventListeners()
setupMapEventListeners(): void;

Defined in: ui/panels/left/MapControlsPanel.ts:119

Set up event listeners on the MapLibre GL map This should be called after the map is initialized

Returns

void

setAircraftCreationManager()
setAircraftCreationManager(manager): void;

Defined in: ui/panels/left/MapControlsPanel.ts:198

Set the AircraftCreationManager instance

Parameters
manager

AircraftCreationManager

Returns

void

setShapeDrawingManager()
setShapeDrawingManager(manager): void;

Defined in: ui/panels/left/MapControlsPanel.ts:206

Set the ShapeDrawingManager instance

Parameters
manager

ShapeDrawingManager

Returns

void

setRouteDrawingManager()
setRouteDrawingManager(manager): void;

Defined in: ui/panels/left/MapControlsPanel.ts:214

Set the RouteDrawingManager instance

Parameters
manager

RouteDrawingManager

Returns

void

zoomIn()
zoomIn(): void;

Defined in: ui/panels/left/MapControlsPanel.ts:222

Zoom in by one level

Returns

void

zoomOut()
zoomOut(): void;

Defined in: ui/panels/left/MapControlsPanel.ts:242

Zoom out by one level

Returns

void

resetView()
resetView(): void;

Defined in: ui/panels/left/MapControlsPanel.ts:262

Reset view to default center and zoom

Returns

void

update()
update(_data?): void;

Defined in: ui/panels/left/MapControlsPanel.ts:307

Update panel content (override in subclasses)

Parameters
_data?

unknown

Returns

void

Overrides

BasePanel.update