@rnacanvas/draw 15.3.0 → 15.3.2

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/README.md CHANGED
@@ -59,3 +59,19 @@ var tertiaryBond = drawing.addTertiaryBond(base1, base2);
59
59
  tertiaryBond.base1 === base1; // true
60
60
  tertiaryBond.base2 === base2; // true
61
61
  ```
62
+
63
+ ### `refreshIDs()`
64
+
65
+ Iterates through elements in the SVG document that is the drawing
66
+ (including all nested elements, as well as the SVG document node itself)
67
+ and assigns a new UUID to any element that previously had an ID assigned to it.
68
+
69
+ Elements without an ID are left unchanged.
70
+
71
+ ```javascript
72
+ drawing.domNode.id = 'my-drawing';
73
+
74
+ drawing.refreshIDs();
75
+
76
+ drawing.domNode.id === 'my-drawing'; // false
77
+ ```