openseadragon-areaselector

0.2.1 • Public • Published

OpenSeaDragonAreaSelector

This OpenSeaDragon plugin introduces a new feature for selecting, moving and resizing selection areas within the viewer.

Demo

osdselector

Features

  • Create + attach an area selector to a viewer.
  • Init location + size
  • Click and drag to move the area selector.
  • Click and drag handles (corners / edges) to resize.
  • Constrain position+size to the maximum bounds of a user-defined area, such as the edge of an image.
  • Mobile devices supported.

Usage

Include areaselector.js in your project

var selector = new OpenSeaDragon.AreaSelector({
    viewer: viewer,
    visible: true
});

or

var selector = viewer.activateAreaSelector({
    //options
});

Grid Snapping

Specify gridWidth and/or gridHeight to have the area selector snap.

Boundary

Limit where the area slector can be, by defining a `boundary`` rect.

Package Sidebar

Install

npm i openseadragon-areaselector

Weekly Downloads

2

Version

0.2.1

License

MIT

Unpacked Size

13.7 kB

Total Files

3

Last publish

Collaborators

  • jedateach