Skip to content

Releases: DDMAL/diva.js

Diva.js 4.0.0

08 Sep 23:07
Compare
Choose a tag to compare

New features in Diva.js 4.0.0:

  • International Image Interoperability Framework (IIIF) support
  • Book Layout view (facing pages)
  • New plugins: Autoscroll (animated page scrolling), Page Alias (pages may have multiple identifiers), IIIF Metadata (displays document metadata from IIIF manifest), IIIF Highlight (displays annotations from a IIIF manifest)
  • Improved development workflow (Gulp)
  • Support for switching documents without reloading the viewer (by calling changeObject)
  • Numerous bug fixes and optimizations (See our commits)

For more details, see the readme.

Note: Some existing features from 3.0 have changed. The breaking changes are as follows (see links for more information):

Diva.js 3.2.0

03 Jun 17:59
Compare
Choose a tag to compare

Changes in Diva.js 3.2.0

New plugins:

  • Autoscroll plugin

Sets Diva to automatically scroll in the primary direction (as determined by settings.verticallyOriented) at a changeable rate. See */js/plugins/autoscroll.js for more documentation. Included demo page.

New public methods:

  • this.isPageInDOM(pageIndex)

Public wrapper for private "isPageLoaded" function, which checks to see if the HTML element (settings.id + "page-" + pageIndex) exists in the DOM.

  • this.getCurrentPageOffset()

Shortcut for this.getPageOffset(this.getCurrentPageIndex()). Returns the offset relative to the parent .diva-outer.

  • this.isVerticallyOriented()

Returns settings.verticallyOriented.

  • Entirety of autoscroll plugin.

If Diva is instantiated with settings.enableAutoscroll.

Changes to public methods:

  • this.getPageIndexForPageXYValues(pageX, pageY)

Functions significantly better. See the Diva 3.1.0 release notes for usage instructions.

  • this.highlightOnPages

Functions correctly now.

Changes to events:

  • HighlightCompleted

Now passes [pageIndex, filename, pageSelector] to all listening functions.

No methods or parameters have been deprecated with this change.

Other notable changes:

  • Updated build script to take in custom location for closure-compiler
  • multiDivaController renamed to activeDivaController

This is used to control which Diva pane is currently active for receiving mouse/keyboard events.

Diva.js 3.1.0

09 Dec 20:53
Compare
Choose a tag to compare

Changes in Diva.js 3.1.0

Changes to public methods:

  • gotoPageByNumber/Index/Name all now accept two more parameters, xAnchor and yAnchor.

xAnchor may be "left", "center", "centre", or "right", and defaults to "center". Using this parameter will make the (xAnchor) part of the page line up with the (xAnchor) part of the Diva pane.

yAnchor may be "top", "center", "centre", or "bottom", and defaults to "top". This parameter functions identically to xAnchor.

  • (new) getPageIndexForPageXYValues(pageX, pageY)

For a given x,y coordinate pair on the current webpage, this function will identify what page is present at that point. The function will return either the associated 0-indexed page index or "false" if no page is present at the given x,y pair.

The x,y pair should be relative to the top left corner of the browser viewport, not the diva-wrapper, diva-inner, or diva-outer objects. Given a jQuery $(window).on('click', function(e){ ... }); listener, the resulting e.pageX and e.pageY values can be used as input to this function.

No methods or parameters have been deprecated with this change.

Other notable changes:

  • All settings that referred to jQuery selectors have been changed to refer to the corresponding jQuery objects.
  • Diva now recognizes the "PanelSizeDidChange" Diva event, and will update the internal values that reflect the size of the Diva panel when this event is published.
  • Diva now comes with a "pagealias" plugin, which allows custom page schemas for mostly cosmetic purposes. See https://github.com/DDMAL/diva.js/wiki/The-API-and-Plugins#using-the-pagealias-plugin for more details.

Diva.js 3.0.0

19 Sep 19:01
Compare
Choose a tag to compare

New features in Diva.js 3.0.0:

  • Lots of speed optimizations – Documents load and scroll faster.
  • Horizontal orientation – Present the pages in your document side-by-side, or switch to the default vertical page layout.
  • Events system – Allows you to pass streaming data from the document viewer into your own website and plugins.
  • Improved mobile support – Tap and pinch to navigate through documents.
  • Drastically improved and updated documentation.
  • Tons of bug fixes.

The new version includes many more minor features and bugfixes. In addition, the documentation has been updated and refactored into a concise, useful reference for anyone installing, using, or developing Diva.js.