mirador-annotation-editor-video 1.1.6 → 1.1.7

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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
- ## [ 1.1.16]
3
+ ## [ 1.1.7]
4
+
5
+ - FIX : GetKonvaShape
6
+
7
+ ## [ 1.1.6]
4
8
 
5
9
  ### Change From MAE 1.0.88
6
10
  - ADD : Implement Multibody template
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.defaultLineWeightChoices = exports.SHAPES_TOOL = exports.OVERLAY_TOOL = exports.KONVA_MODE = void 0;
7
7
  exports.getKonvaAsDataURL = getKonvaAsDataURL;
8
+ exports.getKonvaShape = getKonvaShape;
8
9
  exports.getKonvaStage = getKonvaStage;
9
10
  exports.getSvg = getSvg;
10
11
  exports.hideKonvaStage = hideKonvaStage;
@@ -23,6 +24,17 @@ function getKonvaStage(windowId) {
23
24
  return window.Konva.stages.find(s => s.attrs.id === windowId);
24
25
  }
25
26
 
27
+ /**
28
+ *
29
+ * @param windowId
30
+ * @param shapeId
31
+ * @returns {Node}
32
+ */
33
+ function getKonvaShape(windowId, shapeId) {
34
+ const stage = getKonvaStage(windowId);
35
+ return stage.findOne(`#${shapeId}`);
36
+ }
37
+
26
38
  /**
27
39
  * Resize the Konva stage and redraw it
28
40
  * @param windowId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mirador-annotation-editor-video",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Mirador annotation editor video plugin in a React component. Mirador 4 (Alpha 2) compatible ",
5
5
  "main": "es/index.js",
6
6
  "module": "es/index.js",
@@ -9,6 +9,17 @@ export function getKonvaStage(windowId) {
9
9
  return window.Konva.stages.find((s) => s.attrs.id === windowId);
10
10
  }
11
11
 
12
+ /**
13
+ *
14
+ * @param windowId
15
+ * @param shapeId
16
+ * @returns {Node}
17
+ */
18
+ export function getKonvaShape(windowId, shapeId) {
19
+ const stage = getKonvaStage(windowId);
20
+ return stage.findOne(`#${shapeId}`);
21
+ }
22
+
12
23
  /**
13
24
  * Resize the Konva stage and redraw it
14
25
  * @param windowId