Skip to content

ui/panels/right/TrafficListPanel

Classes

TrafficListPanel

Defined in: ui/panels/right/TrafficListPanel.ts:14

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 TrafficListPanel(): TrafficListPanel;

Defined in: ui/panels/right/TrafficListPanel.ts:21

Returns

TrafficListPanel

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

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/right/TrafficListPanel.ts:25

Subclasses override this to perform custom initialization

Returns

void

Overrides

BasePanel.onInit

setStateManager()
setStateManager(stateManager): void;

Defined in: ui/panels/right/TrafficListPanel.ts:39

Set the state manager to enable aircraft selection coordination

Parameters
stateManager

StateManager

Returns

void

update()
update(data?): void;

Defined in: ui/panels/right/TrafficListPanel.ts:56

Update the traffic list with current aircraft data

Parameters
data?

AircraftData

Returns

void

Overrides

BasePanel.update

getSelectedAircraft()
getSelectedAircraft(): string | null;

Defined in: ui/panels/right/TrafficListPanel.ts:114

Get selected aircraft ID

Returns

string | null

selectAircraft()
selectAircraft(aircraftId): void;

Defined in: ui/panels/right/TrafficListPanel.ts:121

Programmatically select an aircraft

Parameters
aircraftId

string | null

Returns

void

clearSelection()
clearSelection(): void;

Defined in: ui/panels/right/TrafficListPanel.ts:130

Clear selection

Returns

void

onDestroy()
protected onDestroy(): void;

Defined in: ui/panels/right/TrafficListPanel.ts:134

Subclasses override this to perform custom cleanup

Returns

void

Overrides

BasePanel.onDestroy