@rnacanvas/draw 2.21.3 → 2.22.0

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.
@@ -0,0 +1,31 @@
1
+ /**
2
+ * An element in a drawing that is an SVG document.
3
+ */
4
+ export interface DrawingElement {
5
+ /**
6
+ * Returns true if the element is currently present in the SVG document
7
+ * (i.e., is a child of the SVG document) and returns false otherwise.
8
+ */
9
+ isIn(svgDoc: SVGSVGElement): boolean;
10
+ }
11
+ /**
12
+ * A drawing of elements.
13
+ *
14
+ * The primary purpose of this class is to manage an array of elements,
15
+ * removing elements from the array when they are removed from the SVG document that is the drawing.
16
+ *
17
+ * This class uses mutation observers to do so.
18
+ */
19
+ export declare class ElementsDrawing<T extends DrawingElement> {
20
+ private svgDoc;
21
+ elements: T[];
22
+ /**
23
+ * This class will automatically remove elements from the elements array
24
+ * when they are removed from the SVG document that is the drawing.
25
+ *
26
+ * @param svgDoc The SVG document that is the drawing.
27
+ * @param elements The elements in the drawing.
28
+ */
29
+ constructor(svgDoc: SVGSVGElement, elements: T[]);
30
+ }
31
+ //# sourceMappingURL=ElementsDrawing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementsDrawing.d.ts","sourceRoot":"","sources":["../src/ElementsDrawing.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC;CACtC;AAED;;;;;;;GAOG;AACH,qBAAa,eAAe,CAAC,CAAC,SAAS,cAAc;IAQvC,OAAO,CAAC,MAAM;IAAwB,QAAQ,EAAE,CAAC,EAAE;IAP/D;;;;;;OAMG;gBACiB,MAAM,EAAE,aAAa,EAAS,QAAQ,EAAE,CAAC,EAAE;CAShE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnacanvas/draw",
3
- "version": "2.21.3",
3
+ "version": "2.22.0",
4
4
  "description": "Make 2D nucleic acid structure drawings",
5
5
  "repository": {
6
6
  "type": "git",