Constructor
new MapStatusBarView()
- Since:
- Source:
Extends
Members
className
- Source:
collapseTimer :number|null
Type:
- Source:
expandedAt :number
Timestamp (ms) when the loading row was last expanded, or null if it is
currently collapsed.
Type:
- Source:
isCurrentlyLoading :boolean
Whether the map is currently reporting that layers are loading.
Type:
- Source:
lastMessageUpdateAt :number
Timestamp (ms) of the last time the visible message was updated.
Type:
- Source:
messageUpdateTimer :number|null
Type:
- Source:
model :Map
The map model that provides the aggregate `isLoadingLayers`/
`loadingLayersMessage` loading state.
Type:
- Source:
pendingMessage :string
The most recent message awaiting display, throttled by
MESSAGE_UPDATE_INTERVAL_MS.
Type:
- Source:
Passed through to the ScaleBarView.
Type:
- Source:
revealTimer :number|null
Type:
- Source:
Passed through to the ScaleBarView.
Type:
- Source:
Methods
clearCollapseTimer()
Clear the pending collapse timer, if any.
- Source:
clearMessageUpdateTimer()
Clear the pending message-update timer, if any.
- Source:
clearRevealTimer()
Clear the pending reveal timer, if any.
- Source:
collapse()
Collapse the status bar back down to just the scale bar.
- Source:
expand()
Expand the status bar to reveal the loading row.
- Source:
flushMessageUpdate()
Render the currently pending message and record the update time.
- Source:
handleBarWidthChange(barWidth)
Mirror the scale bar's live pixel width onto this element's own style so
this box's width (see `.map-status-bar` in map-view.css) can track it via a
plain CSS calc(), growing/shrinking by the same amount.
Parameters:
| Name |
Type |
Description |
barWidth |
number
|
The scale bar graphic's current width, in pixels. |
- Source:
handleLoadingFinished()
Handle loading having finished, whether or not the row ever opened. If it
finished before it was ever revealed, this is a no-op (no flash). If it
finished before the minimum open duration elapsed, show a brief "completed"
message before collapsing; otherwise collapse right away.
- Source:
handleLoadingStateChange()
React to changes in the map's aggregate layer-loading state.
- Source:
initialize(options)
Parameters:
| Name |
Type |
Description |
options |
object
|
The options for this view.
Properties
| Name |
Type |
Description |
model |
Map
|
The map model that provides the aggregate
`isLoadingLayers`/`loadingLayersMessage` loading state. |
scaleModel |
GeoScale
|
Passed through to the ScaleBarView. |
pointModel |
GeoPoint
|
Passed through to the ScaleBarView. |
|
- Source:
isExpanded() → {boolean}
- Source:
Returns:
Whether the loading row is currently expanded.
-
Type
-
boolean
onClose()
- Source:
render()
- Source:
scheduleMessageUpdate(message)
Show the latest message, but no more than once every
MESSAGE_UPDATE_INTERVAL_MS, so a burst of near-simultaneous
layer status changes settles into a single visible update instead of
flickering through every intermediate value. Always resolves to the
most recent message once the interval has elapsed.
Parameters:
| Name |
Type |
Description |
message |
string
|
The latest message to (eventually) display. |
- Source:
scheduleReveal()
Wait for REVEAL_DELAY_MS before expanding, so brief loads never
cause the loading row to flash open then closed.
- Source: