Package Exports
- markerjs2
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (markerjs2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
marker.js 2 — Add image annotation to your web apps
marker.js 2 is a JavaScript browser library to enable image annotation in your web applications. Add marker.js 2 to your web app and instantly enable users to annotate and mark up images. You can save, share or otherwise process the results.
Installation
npm install markerjs2
or
yarn add markerjs2
Usage
To add image annotation to your web application follow these 3 easy steps:
- Create an instance of
markerjs2.MarkerArea
by passing a target image reference to the constructor. - Set an event handler for
render
event. - Call the
show()
method.
Here's a simple example:
import * as markerjs2 from 'markerjs2';
let markerArea = new markerjs2.MarkerArea(document.getElementById('myimg'));
markerArea.addRenderEventListener(dataUrl => {
document.getElementById('myimg').src = dataUrl;
});
markerArea.show();
Credits
marker.js 2 is using icons from Material Design Icons for its toolbar.
License
Linkware (see LICENSE for details) - the UI displays a small link back to the marker.js 2 website which should be retained.
Alternative licenses are available through the marker.js 2 website.