Mirador exposes a fairly powerful set of events as its primary API, and it is possible to introspect the state of Mirador with a number of convenience methods to react to changes and export and import data and viewer state. In the following examples, we'll go through some common tasks that can be accomplished programmatically, and answer any questions for improving our documentation. To follow along, simply visit projectMirador.org/demo and open the javascript console. We will work through these examples by manipulating Mirador programmatically in the console.
The projectMirador.org/demo page exposes an instance of Mirador called myMiradorInstance
. All methods, events, and state can be accessed here. Let's start by retrieving different pieces of information about the current viewer state.
The saveController
is the central state manager of Mirador. Though it is not fully implemented, most state of interest can be accessed through it. Type `m