
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
@annotorious/plugin-boolean-operations
Advanced tools
Adds functionality to merge and subtract annotation shapes
Adds functionality to merge and subtract annotation shapes.

Important: this plugin only supports
@annotorious/openseadragonat this time. Support for plain (JPEG, PNG,...) images is not yet implemented. Get in touch via the forum if you are interested in using this with the@annotorious/annotoriousor@annotorious/reactpackages.
npm install @annotorious/plugin-boolean-operations
import OpenSeadragon from 'openseadragon';
import { createOSDAnnotator } from '@annotorious/openseadragon';
import { mountPlugin as mountBooleanPlugin } from '@annotorious/plugin-boolean-operations';
import '@annotorious/openseadragon/annotorious-openseadragon.css';
/**
* Important: the plugin requires the multi-select option
* to be enabled!
*/
const viewer = OpenSeadragon({
/** init your viewer **/
multiSelect: true
});
const anno = createOSDAnnotator(viewer, { /* options */ });
// Initialize the plugin
const plugin = mountBooleanPlugin(anno);
// The plugin has two functions: `mergeSelected` and `subtractSelected`
// - More than one shape must be selected.
// - `mergeSelected` will create a multipolygon union shape of all
// selected shapes
// - `subtractSelelected` will remove all other shapes from the first
// selected shap.
// - Selection order is important! Only data associated with the first
// selected shape is preserved. Data from other selections is lost.
document.getElementById('merge').addEventListener('click', () => {
plugin.mergeSelected();
});
document.getElementById('subtract').addEventListener('click', () => {
plugin.subtractSelected();
});
FAQs
Adds functionality to merge and subtract annotation shapes
We found that @annotorious/plugin-boolean-operations demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.