Hierarchy

  • StoriiiesViewer

Constructors

Properties

#_activeAnnotationIndex: number = -1

Index pointing to the annotation from the annotationPage, currently being viewed
The active annotationPage is treated as being the same as activeCanvasIndex

#_activeCanvasIndex: number = 0

Index pointing to the canvas from the manifest currently being viewed
This value is also used to infer the active annotationPage

#_showInfoArea: boolean = true

Visibility flag for the infoArea element

#annotationIndexCeiling: number

Uppermost number of slides considering factors such as credits

#annotationIndexFloor: number = -1

Lowermost number of slides considering factors such as a title slide

#prefersReducedMotion: boolean

Cached user preference on reduced-motion

#statusCodes: statusCodes = ...

Error codes and their levels and user facing log messages

DOMPurifyConfig: Config = ...

DOMPurify configuration

activeCanvasAnnotations: Annotation[] = []

The annotations for the current canvas

annotationPages: AnnotationPage[] = []

The annotationPages retrieved from the manifest

canvases: Canvas[]

The canvases retrieved from the manifest

containerElement: null | HTMLElement = null

The normalised reference to the container where this instance is mounted

controlButtonElements: ControlButtons

References to the navigation control button HTML elements

disablePanAndZoom: boolean = false

Whether to disable panning and scrolling

infoAreaElement: HTMLElement

A reference to the info-area HTML element

infoTextElement: HTMLElement

A reference to the info-text-area HTML element

infoToggleElement: HTMLElement

A reference to the info-toggle HTML element

instanceId: number

ID used for creating id attributes that shouldn't clash, or referencing a particular instance of StoriiiesViewer

label: string = ""

The label retrieved from the manifest

manifest: Manifest

The IIIF manifest loaded into this instance

manifestUrl: string

The URL for the IIIF manifest loaded into this instance

requiredStatement: {
    label: string;
    value: string;
}

The required statement label and value retrieved from the manifest

Type declaration

  • label: string
  • value: string
showCreditSlide: boolean = true

Whether to display the closing credit slide. Defaults to true, can be overriden in StoriiiesViewerConfig

summary: string

The summary retrieved from the manifest

viewer: Viewer

A reference to the OpenSeadragon viewer

#instanceCounter: number = 0

Index representing the number of StoriiiesViewer instances in the current scope

Accessors

  • get activeAnnotationIndex(): number
  • Get the active annotation index
    Used to determine which annotation is currently active

    Returns number

  • set activeAnnotationIndex(index): void
  • Set the active annotation index and perform any necessary updates
    Used to navigate between annotations

    Parameters

    • index: number

    Returns void

  • get activeCanvasIndex(): number
  • Get the active canvas index
    Used to determine which canvas is currently active

    Returns number

  • set activeCanvasIndex(index): void
  • Set the active canvas index and perform any necessary updates
    Used to navigate between canvases

    Parameters

    • index: number

    Returns void

  • get showInfoArea(): boolean
  • Get the showInfoArea value
    Used to determine whether the info area is visible

    Returns boolean

  • set showInfoArea(value): void
  • Set the showInfoArea value and perform any necessary updates
    Used to toggle the info area visibility

    Parameters

    • value: boolean

    Returns void

Methods

  • Generate HTML markup for the title slide

    Returns string

  • Generate HTML markup for an annotation slide

    Returns string

  • Generate HTML markup for an annotation slide

    Returns string

  • Takes a service ID and returns the expanded URL that includes "/info.json"
    This format is a MUST for the IIIF Image API, so we can rely on our manipulations being valid

    Parameters

    • serviceID: string

    Returns string

  • Get the annotations for the current canvas

    Returns Annotation[]

  • Retrieves the annotationPages for the manifest (Temporary solution)

    Returns AnnotationPage[]

  • Get the region from the URL as a Rect relative to the viewport of this instance's viewer

    Parameters

    • Optional url: string

    Returns null | Rect

  • Load the manifest and extract the label, canvases and annotation pages

    Returns Promise<void>

  • Create area for label, annotations and controls

    Returns void

  • Log a message to the console, or throw an exception

    Parameters

    • code: string
    • withException: boolean = false

    Returns void

Generated using TypeDoc