@EricHanLiu EricHanLiu released this Sep 24, 2018 · 3 commits to master since this release

Assets 3

Diva 6 is simultaneously our biggest, and our smallest, release yet! We have rewritten Diva as an ES6 module, have removed all external library dependencies, refreshed the public API, optimized and inlined UI images, refactored the CSS. These optimizations make Diva a lightweight, but fully-featured, IIIF viewer component, suitable for seamless integration into your web applications.

Additionally, we provide support for viewing images using the upcoming IIIF Presentation API version 3.0.

New Features

  • Compatibility with IIIF Presentation API version 2.1 and 3.0.
  • Small footprint, zero dependencies. Can be deployed with just a JavaScript and a CSS file.
  • Rewritten in ES6 for compatibility with the new JavaScript module system.
  • New plugins
    • IIIF Metadata
    • Image Manipulation
  • Viewport height change for better visibility
  • The 'page number' tool now displays page label names instead of page numbers, and page labels are affixed to the top right of every page.

Bug Fixes

  • Diva no longer just tracks a single page index for its public methods and page interaction, but rather an array of all the visible pages in the viewport.

Plugin System Changes

  • Register plugins by adding them to the plugins setting when instantiating Diva, instead of via window.diva.registerPlugin(...). See Plugins for more info.

Public Method Changes

New

  • getAllPageURIs: Gets all the page image URIs in the IIIF manifest.
  • getCurrentCanvas: Gets the canvas identifier for the currently visible page.
  • getCurrentPageURI: Gets the URI for the current page.
  • getGridPagesPerRow: Get the number of grid pages per row in grid mode.
  • getOtherImages: If a canvas has multiple images defined, gets the non-primary images.
  • getPageDimensions: Gets the page dimensions in the current view and zoom level.
  • getPageImageURL: Gets the URL for the image of the page at the given index. The optional size parameter supports setting the image width or height (default is full-sized).
  • gotoPageByURI: Jumps to a page based on its URI.
  • hasOtherImages: Whether the page canvas has other images to display.
  • isInFullscreen: Checks if the viewer is currently in fullscreen mode.
  • setGridPagesPerRow: Set the number of grid pages per row.

Deprecated

  • getAliasForPageIndex
  • getCurrentAliasedPageIndex
  • getPageIndex
  • getPageIndexForAlias
  • getPageIndicesForAlias
  • getURLHash
  • gotoPageByAliasedNumber
  • gotoPageByNumber
  • toggleGridView

Settings Changes

New

  • acceptHeader: A string which specifies what header to send off to the server in content negotiation (for IIIF manifests).

Deprecated

  • iipServerURL
  • imageDir