Creates a dispatcher.
Optionalinit: { actions?: Record<string, Action[]>; documentViewer?: DocumentViewer }
Optional initial state.
Optionalactions?: Record<string, Action[]>Initial actions keyed by trigger name.
OptionaldocumentViewer?: DocumentViewerViewer used when trigger is called without one.
Appends an action to the list run for a trigger.
Trigger name, such as 'U' (mouse up) or 'D' (mouse down).
The action to add.
Returns all actions keyed by trigger name.
The live map of trigger names to their action lists.
Runs every action registered for a trigger, in order. Does nothing when no viewer is available.
Trigger name, such as 'U' or 'D'.
The annotation that fired the trigger, or null.
The originating DOM event, or null.
Optionalviewer: DocumentViewer
Viewer to run the actions against; defaults to the viewer given to the constructor.
Stores actions by trigger name ('U' mouse up, 'D' mouse down, ...) and runs them in order on trigger: GoTo navigates, URI opens, Named navigates or prints, Hide shows or hides fields, ResetForm resets. GoToR is not executed.