ui/panels/left/DisplayOptionsPanel¶
Classes¶
DisplayOptionsPanel¶
Defined in: ui/panels/left/DisplayOptionsPanel.ts:23
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¶
Defined in: ui/panels/left/DisplayOptionsPanel.ts:108
Returns¶
Overrides¶
Properties¶
panelElement¶
Defined in: ui/panels/BasePanel.ts:14
Inherited from¶
panelContent¶
Defined in: ui/panels/BasePanel.ts:15
Inherited from¶
collapseButton¶
Defined in: ui/panels/BasePanel.ts:16
Inherited from¶
listeners¶
Defined in: ui/panels/BasePanel.ts:17
Inherited from¶
panelSelector¶
Defined in: ui/panels/BasePanel.ts:25
CSS selector for the panel container
Inherited from¶
contentId?¶
Defined in: ui/panels/BasePanel.ts:26
ID of the panel content element (optional)
Inherited from¶
Methods¶
init()¶
Defined in: ui/panels/BasePanel.ts:33
Initialize the panel Must be called after DOM is ready
Returns¶
void
Inherited from¶
toggleCollapse()¶
Defined in: ui/panels/BasePanel.ts:73
Toggle panel collapse state
Returns¶
void
Inherited from¶
addEventListener()¶
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¶
bindEvent()¶
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¶
bindClick()¶
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¶
bindInput()¶
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¶
bindChange()¶
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¶
bindCheckbox()¶
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¶
setInputValue()¶
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¶
setChecked()¶
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¶
setText()¶
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¶
getElement()¶
Defined in: ui/panels/BasePanel.ts:176
Get an element within the panel
Parameters¶
selector¶
string
Returns¶
HTMLElement | null
Inherited from¶
getElementById()¶
Defined in: ui/panels/BasePanel.ts:184
Get an element by ID within the panel
Parameters¶
id¶
string
Returns¶
HTMLElement | null
Inherited from¶
trackSubscription()¶
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¶
destroy()¶
Defined in: ui/panels/BasePanel.ts:205
Clean up panel resources
Returns¶
void
Inherited from¶
onDestroy()¶
Defined in: ui/panels/BasePanel.ts:215
Subclasses override this to perform custom cleanup
Returns¶
void
Inherited from¶
show()¶
Defined in: ui/panels/BasePanel.ts:222
Show the panel
Returns¶
void
Inherited from¶
hide()¶
Defined in: ui/panels/BasePanel.ts:231
Hide the panel
Returns¶
void
Inherited from¶
isVisible()¶
Defined in: ui/panels/BasePanel.ts:240
Check if panel is visible
Returns¶
boolean
Inherited from¶
onInit()¶
Defined in: ui/panels/left/DisplayOptionsPanel.ts:112
Subclasses override this to perform custom initialization
Returns¶
void
Overrides¶
setStateManager()¶
Defined in: ui/panels/left/DisplayOptionsPanel.ts:120
Set the state manager for coordinating with other panels
Parameters¶
stateManager¶
Returns¶
void
setApp()¶
Defined in: ui/panels/left/DisplayOptionsPanel.ts:138
Set the app reference for accessing MapOverlay
Parameters¶
app¶
Returns¶
void
setBooleanOption()¶
Defined in: ui/panels/left/DisplayOptionsPanel.ts:560
Set (or toggle, when value is omitted) one of the boolean map display
options from outside the panel. Console commands (SHOWTRAF, SWRAD, ...)
use this so they drive the exact same storage + checkbox + state
pipeline as a click on the corresponding checkbox.
Returns the applied value, or null when the stateKey is not a known boolean option (or the panel has no state manager yet).
Parameters¶
stateKey¶
keyof DisplayOptions
value?¶
boolean
Returns¶
boolean | null
update()¶
Defined in: ui/panels/left/DisplayOptionsPanel.ts:640
Update panel content (override in subclasses)
Returns¶
void