@cogic/annotorious 2.7.15 → 2.7.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cogic/annotorious",
3
- "version": "2.7.15",
3
+ "version": "2.7.17",
4
4
  "description": "A JavaScript image annotation library",
5
5
  "main": "dist/annotorious.min.js",
6
6
  "scripts": {
@@ -307,6 +307,11 @@ export default class ImageAnnotator extends Component {
307
307
  getSelectedImageSnippet = () =>
308
308
  this.annotationLayer.getSelectedImageSnippet();
309
309
 
310
+ getCurrentDrawingTool = () => this.annotationLayer.tools?.current;
311
+
312
+ getSelectedShape = () =>
313
+ this.annotationLayer.selectedShape;
314
+
310
315
  listDrawingTools = () =>
311
316
  this.annotationLayer.listDrawingTools();
312
317
 
package/src/index.jsx CHANGED
@@ -200,6 +200,10 @@ export class Annotorious {
200
200
  getSelectedImageSnippet = () =>
201
201
  this._app.current.getSelectedImageSnippet();
202
202
 
203
+ getCurrentDrawingTool = () => this._app.current.getCurrentDrawingTool();
204
+
205
+ getSelectedShape = () => this._app.current.getSelectedShape();
206
+
203
207
  listDrawingTools = () =>
204
208
  this._app.current.listDrawingTools();
205
209