@medmain/image-annotations-openseadragon-plugin
v1.0.7
Published
Medmain's Image Annotations OpenSeadragon plugin
Downloads
23
Readme
This plugin allows you to draw vector annotations over OpenSeadragon deep zoom images. The plugin creates the drawings on a SVG overlay that scales with the image.
Usage
Installation
You will need both OpenSeadragon and this plugin loaded to your page.
You can download the plugin manually for now.
npm install openseadragon @medmain/image-annotations-openseadragon-plugin --save-dev
You can start an OpenSeadragon viewer with Annotations plugin using:
const viewer = OpenSeadragon(options);
const annotations = new OpenSeadragon.Annotations({
viewer,
values,
onChange: async action => {
const annotations = await Annotations.save(this.annotations.getAnnotationsXY);
},
beforeDelete: async () => {
return confirm('Delete?')
}
});