Cartographer App User and Technical Documentation
Home
User Docs
Technical Docs
Home
User Docs
Technical Docs
  • User Documentation
    • Introduction
    • Getting Started
    • User Interface
    • Actions
  • Technical Documentation
    • GitHub Authentication
    • Components

      • AppFooter Component
      • AppHeader Component
      • AppSidebar Component
      • ContentPreviewMdiv Component
      • Content Preview Measure
      • Content Preview Pane
      • ImageMismatchModal Component
      • ImageSelection Modal
      • LoadGitModal Component
      • LoadIIIFModal Component
      • LoadLocalImage Component
      • LoadXMLModal Component
      • MainMenu Component
      • MeasureModal Component
      • MdivModal Component
      • OsdComponent Component
      • PageImportModal Component
      • PagesListEntry Component
      • PagesModal Component
      • Vuex Store (src/store/index.js)
    • Store
      • Vuex Store (src/store/index.js)
    • Tools
      • IIIF Tools (src/tools/iiif.js)
      • MEI Mapping Tools (src/tools/meiMappings.js)

OsdComponent Component

Displays the OpenSeadragon image viewer with annotation support for zones and measures.


Overview

The OsdComponent component:

  • Renders an OpenSeadragon viewer for high-resolution images.
  • Integrates Annotorious for drawing and managing annotation zones.
  • Renders overlays for zones, colored by mdiv.
  • Handles selection, creation, update, and hover of annotation zones.
  • Reacts to Vuex store changes for pages, zones, mode, and selection.

Layout

  • Viewer: Main image viewer (#osdContainer), full width or reduced if measure list is visible.
  • Overlays: Annotation zones rendered as overlays with labels.

Props

None


Data

NameTypeDescription
colorsArrayList of RGBA colors for mdiv overlays
colorIndexNumberCurrent color index for assigning colors
mdivColorsObjectMapping of mdiv indices to assigned colors

Computed Properties

NameDescription
imageArrayReturns the array of images from the store
modeReturns the current annotation mode from the store
measureListVisibleWhether the measure list pane is visible

Methods

NameDescription
getNextColorReturns the next color for mdiv overlays
renderZonesRenders annotation overlays for all zones on the current page
isDrawingModeReturns whether the given (or current) mode is a drawing mode (manualRect or additionalZone)
toggleSelectionEnables/disables drawing based on mode: sets Annotorious read-only state, toggles the active drawing layer, OpenSeadragon gesture navigation, and Annotorious drawing tracker

Lifecycle Hooks

  • mounted: Initializes OpenSeadragon and Annotorious, sets up event listeners, and Vuex watchers.
  • beforeUnmount: Cleans up Vuex watchers.

Example

<OsdComponent />
Prev
MdivModal Component
Next
PageImportModal Component