Skip to content

Complete Configuration API

Jack Reed edited this page May 19, 2020 · 1 revision

Application-level Configuration

Defaults are in italics.

  • id: ID of HTML element that will be used by Mirador
  • buildPath: Assign the default location of the Mirador directory
  • data: Array of manifest URIs to load into Mirador. Each item in the array must use the following format: { "manifestUri": "[Manifest URI]", "location": "[Institution Name]"}
  • saveSession: [true, false] Whether or not to save a user's session to local storage
  • layout: Default configuration of slots on load (Default: '1x1')
  • annotationEndpoint: Required to allow annotation creation. To store annotations locally, use { "name":"Local Storage", "module": "LocalStorageEndpoint" }
  • openManifestsPage: [true, false] Whether or not Mirador should display the manifests page on load. It is only valid if no windowObjects have been initialized. If there are multiple slots, it will be bound to the first slot and the selected manifest will open in that slot
  • manifestsPanel.name: ['Classic Mirador Manifests Panel'] A description of the manifest selection panel enabled for Mirador. This is only a reminder --- the actual panel type is specified in manifestsPanel.module.
  • manifestsPanel.module: ['ManifestsPanel', 'CollectionTreeManifestsPanel'] The class name of the manifest selection panel enabled for Mirador. ManifestsPanel is the classic manifests-only panel, and CollectionTreeManifestsPanel is an expanded version of ManifestsPanel with an additional collection navigation tree. Aside from the above, it is also possible to implement other panel types in the source code (see js/src/viewer/manifestsPanel.js and js/src/viewer/collectionTreeManifestsPanel.js as examples) and specify its class name here.
  • manifestsPanel.options: Additional options passed into the selected manifest panel object. May be useful when building a custom manifest selection panel type.
  • mainMenuSettings.show: [true, false] Whether or not to display the top menu
  • mainMenuSettings.buttons: Control individual buttons in the top menu
    • mainMenuSettings.buttons.bookmark: [true, false] Controls display of 'Bookmark' in the top menu
    • mainMenuSettings.buttons.layout: [true, false] Controls display of 'Change Layout' in the top menu
    • mainMenuSettings.buttons.options: [true, false] Controls display of 'Options' in the top menu. Currently, 'Options' has not been implemented.
    • mainMenuSettings.buttons.fullScreenViewer: [true, false] Controls display of the 'Full Screen' button in the top menu, which allows for fullscreen view of Mirador
  • showAddFromURLBox: [true, false] Controls display of "Add new object from URL" on manifest listing page
  • autoHideControls: [true, false] Controls whether to hide buttons when the cursor is away from the canvas
  • fadeDuration: [400] Number of milliseconds to take to fade out buttons when the cursor is away from the canvas (requires enabling autoHideControls)
  • timeoutDuration [3000] Number of milliseconds that the cursor must spend away from the canvas before the buttons begin fading out (requires enabling autoHideControls)

Loaded Objects

windowObjects is an array that indicates settings for individual windows in Mirador. Defaults are in italics.

  • loadedManifest: [Manifest URI] The manifest URI must be in data, above.
  • canvasID: [Canvas URI] If set, must reference a canvas in loadedManifest. The window will open on this particular canvas.
  • availableViews: defaults to ['ThumbnailsView', 'ImageView', 'ScrollView', 'BookView'], any subset removes the others
  • viewType: one of ['ThumbnailsView', 'ImageView', 'ScrollView', 'BookView'] - if using availableViews, must be in subset
  • bottomPanel: [true, false] whether or not to make the bottom panel available in this window
  • bottomPanelVisible : [true, false] whether or not to make the bottom panel visible in this window on load. This setting is dependent on bottomPanel being true
  • sidePanel: [true, false] whether or not to make the side panel available in this window
  • sidePanelVisible : [true, false] whether or not to make the side panel visible in this window on load. This setting is dependent on sidePanel being true
  • overlay: [true, false] whether or not to make the overlay (used for the metadata view) available/visible in this window
  • annotationLayer: [true, false] whether or not to make annotation layer available in this window
  • annotationCreation: [true, false] whether or not to make annotation creation available in this window, only valid if annotationLayer is set to True and an annotationEndpoint is defined. This setting does NOT affect whether or not a user can edit an individual annotation that has already been created.
  • annotationState : ['annoOff', 'annoOnCreateOff', 'annoOnCreateOn'] whether or not to turn on the annotation layer on window load
  • fullScreen: [true, false] whether or not to make the full screen button visible to user
  • displayLayout: [true, false], whether or not to display all slot layout options, removing individual menu options is separate (see layoutOptions)
  • layoutOptions: control individual menu items in layout menu. if displayLayout is false, these options won't be applied
    • layoutOptions.newObject: [true, false]
    • layoutOptions.close: [true, false]
    • layoutOptions.slotRight: [true, false]
    • layoutOptions.slotLeft: [true, false]
    • layoutOptions.slotAbove: [true, false]
    • layoutOptions.slotBelow: [true, false]
  • windowOptions: [data specific to the view type, such as OSD bounds and zoom level - automatically gets set and saved by SaveController]
  • id: [unique window ID - set by application and automatically gets set and saved by SaveController]