Skip to content

altert/OpenseadragonFabricjsOverlay

Folders and files

NameName
Last commit message
Last commit date
Jul 22, 2020
Jul 31, 2020
Jul 22, 2020
Feb 9, 2016
Aug 8, 2017
Jul 24, 2017
Apr 8, 2021
Aug 27, 2021
Jul 24, 2017

Repository files navigation

OpenSeadragonFabricjsOverlay

An OpenSeadragon plugin that adds fabricjs overlay capability.

Compatible with OpenSeadragon 2.1.0 or greater.

Documentation

To use, include the openseadragon-fabricjs-overlay.js file after openseadragon.js on your web page.

To add fabricjs overlay capability to your OpenSeadragon Viewer, call fabricjsOverlay({scale: scaleWidth}) on it. scaleWidth is arbitrary scale for created fabric canvas. 0 corresponds to 0 and scaleWidth corresponds to 1 in OpenSeadragon viewport coordinates. This will return a new object with the following methods:

  • fabricCanvas(): Returns fabricjs canvas that you can add elements to
  • resize(): If your viewer changes size, you'll need to resize the fabricjs overlay by calling this method.

See online demo or demo.html for an example of it in use.

Thanks

support for multiple overlays commissioned by qikkeronline - thanks for supporting open source