Socket
Book a DemoInstallSign in
Socket

@annotorious/plugin-magnetic-outline

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@annotorious/plugin-magnetic-outline

Computer-vision-powered drawing tools for Annotorious

latest
Source
npmnpm
Version
0.1.7
Version published
Weekly downloads
3
-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

Annotorious Magnetic Outline Tools

An Annotorious plugin that adds computer-vision powered drawing tools for semi-automatic annotation.

A screenshot of the Intelligent Scissors drawing tool.

Tools

1. Intelligent Scissors

A Photoshop-style "magnetic lasso" for tracing object outlines. Automatically follows edges as you move the cursor, making it easy to outline complex shapes with minimal clicking.

How to use:

  • Click to place a starting point on the object’s edge (the cursor will briefly change to a wait spinner).
  • Move the cursor along the outline — the tool will automatically trace the edge.
  • Click to lock in intermediate points if needed for tricky areas.
  • Double-click or click back on the first point to complete the shape.

Note: You cannot zoom or pan the image while drawing with this tool.

2. Magnetic Cursor

Snaps the mouse cursor to corner points of nearby objects in the image – ideal for quickly marking precise points.

How to use:

  • Move the crosshair near the edge or corner of an object.
  • The cursor will "snap" to detected points for accurate placement.
  • Click to place points.
  • Double-click or click back on the first point to complete the shape.

Note: After zooming or panning the image, the cursor will be briefly unavailable while keypoints are re-computed for the new view.

Installation

npm install @annotorious/plugin-magnetic-outline

Important: This plugin currently supports only @annotorious/openseadragon. Support for plain images (JPEG, PNG,...) is not yet available. Join the discussion if you're interested in these integrations.

Usage

import OpenSeadragon from 'openseadragon';
import { createOSDAnnotator } from '@annotorious/openseadragon';
import { mountPlugin } from '@annotorious/plugin-magnetic-outline';

import '@annotorious/openseadragon/annotorious-openseadragon.css';

const viewer = OpenSeadragon({
  /** OSD init options **/  
});

const anno = createOSDAnnotator(viewer, {
  /** Annotorious init options **/
});

// Mounts the plugin and registers both tools
mountPlugin(anno);

// Set the active tool
anno.setDrawingTool('magnetic-cursor'); // or 'intelligent-scissors'

FAQs

Package last updated on 25 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts