How to use the openseadragon.Browser function in openseadragon

To help you get started, we’ve selected a few openseadragon examples, based on popular ways it is used in public projects.

github btzr-io / Villain / packages / villain-react / src / components / render.js View on Github external
initOpenSeaDragon = () => {
    const { id, container, pages, renderError, updateContextState } = this.props

    // Detect browser vendor
    this.browser = getKeyByValue(OpenSeaDragon.BROWSERS, OpenSeaDragon.Browser.vendor)

    // Create viewer
    this.viewer = OpenSeaDragon({
      element: this.OSDContainer.current,
      tileSources: pages[0],
      ...OSDConfig,
    })

    // Events handler
    this.viewer.addHandler('open', () => {
      this.renderLayout()
      this.fitBounds()

      // Prevent unessesart context updates
      if (renderError) {
        updateContextState({ renderError: false })

openseadragon

Provides a smooth, zoomable user interface for HTML/Javascript.

BSD-3-Clause
Latest version published 4 months ago

Package Health Score

85 / 100
Full package analysis

Similar packages