Creates a dispatcher.
A mixin that enables many different classes to construct and dispatch PDF Actions.
Methods
-
addAction(trigger, action [, replace])
-
Add a single action to a trigger.
Parameters:
Name Type Argument Description triggerstring The name of the trigger to which to add the action. actionCore.Actions.Action | object The action to add, or an object representing the desired properties (including a name) replaceboolean <optional>
True if existing actions should be replaced -
addActions(actions)
-
Add the actions to the dispatcher so they run on next trigger, constructing them if necessary
Parameters:
Name Type Description actionsobject The actions to add, as an object with triggers for keys and arrays of action-describing objects for values. -
getActions()
-
Get all the actions associated with this dispatcher.
Returns:
The associated actions (in the same format as addActions)- Type
- object
-
getDocumentViewer()
-
Get the associated DocumentViewer.
Returns:
The associated DocumentViewer instance- Type
- Core.DocumentViewer
-
setDocumentViewer(documentViewer)
-
Set the internal DocumentViewer reference, which is required for some actions to execute correctly.
Parameters:
Name Type Description documentViewerCore.DocumentViewer The DocumentViewer instance