Creates a new RotorNavigationService instance.
The context providing access to the active trace
Provides terse/verbose/off mode for message formatting
Used to push rotor boundary messages (intersection and compare mode) through the text alert region. The alert region re-mounts on every dispatch (keyed by a revision counter), which is what causes screen readers to re-announce on repeat key presses. Without this, identical messages dispatched only to the rotor area do not re-announce.
Advances to the next rotor navigation mode.
The name of the new rotor mode, or grid info if entering grid mode
Moves to the previous rotor navigation mode.
The name of the new rotor mode, or grid info if entering grid mode
Gets the current rotor mode index.
The current rotor index
Moves to the next data point in the specified direction based on current compare mode.
The direction to move ('left' or 'right')
Error message if move failed, null otherwise
Moves up to a data point with lower/higher value based on rotor mode, or moves up one grid cell in grid mode.
Error message if move failed, null otherwise
Moves down to a data point with lower/higher value based on rotor mode, or moves down one grid cell in grid mode.
Error message if move failed, null otherwise
Moves left to a data point with lower/higher value based on rotor mode, or moves left one grid cell in grid mode.
Error message if move failed, null otherwise
Moves right to a data point with lower/higher value based on rotor mode, or moves right one grid cell in grid mode.
Error message if move failed, null otherwise
Sets the rotor mode based on the current index and updates context state.
Gets the current rotor mode name.
The rotor mode is rotorIndex here but a boolean on the trace, so the two must be resynced whenever the active trace changes underneath it. The paths that swap traces — PageUp/PageDown between layers, and a live data update rebuilding the figure — call resetToDataMode first, which clears the outgoing trace's flags while it is still active and lands the new one in data mode. Without that, a capability-gated mode would keep routing arrow keys to a trace that never entered it: dead keys, or a mode announced that the trace is not actually in.
The display name of the current rotor mode
Gets the comparison type for the current rotor mode.
'lower' or 'higher' based on the current mode
Resets the rotor to the default data mode. Called when the navigation target changes wholesale (e.g., the candlestick delta layer activates or deactivates) so a compare mode from the previous trace cannot silently map onto a different unit of the new one.
Manages rotor-based navigation for the active trace via alt+shift+up and alt+shift+down
Purpose:
Available modes vary by trace type:
Mode descriptions:
Responsibilities:
Dependencies:
Notes: