项目作者: Emigre

项目描述 :
Draw annotations over deep zoom images
高级语言: JavaScript
项目地址: git://github.com/Emigre/openseadragon-annotations.git
创建时间: 2013-05-22T17:41:25Z
项目社区:https://github.com/Emigre/openseadragon-annotations

开源协议:BSD 3-Clause "New" or "Revised" License

下载


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.

Preview

Usage

Installation

You will need both OpenSeadragon and this plugin. You can download the plugin manually or install it with a package manager like Bower or npm.

  1. npm install openseadragon openseadragon-annotations --save-dev

Once OpenSeadragon and the plugin are included in your page, you can start an OpenSeadragon viewer with the plugin in this way:

  1. const viewer = OpenSeadragon({
  2. id: 'viewer',
  3. showNavigator: true,
  4. tileSources: {
  5. Image: {
  6. xmlns: 'http://schemas.microsoft.com/deepzoom/2008',
  7. Url: 'http://content.zoomhub.net/dzis/TDbz_files/',
  8. Format: 'jpg',
  9. Overlap: '1',
  10. TileSize: '254',
  11. ServerFormat: 'Default',
  12. Size: {
  13. Height: '4409',
  14. Width: '7793'
  15. }
  16. }
  17. }
  18. });
  19. const annotations = new OpenSeadragon.Annotations({ viewer });

The viewer screen will have an additional set of icons at the bottom-left side, that you can use to toggle the drawing mode and draw annotatations over the image.

Supported Browsers

The plugin works on Chrome, Firefox, Opera and Safari. Internet Explorer 9 and above and Microsoft Edge are also supported, but performance is worse in them due to their lack of support for the vector-effect SVG attribute.