@rnacanvas/draw 2.20.1 → 2.21.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.
package/dist/Drawing.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  import type { Nucleobase } from '@rnacanvas/draw.bases';
2
2
  import type { StraightBond } from '@rnacanvas/draw.bonds';
3
+ /**
4
+ * The minimum and maximum X and Y coordinates of a drawing.
5
+ */
6
+ type Boundaries = {
7
+ readonly minX: number;
8
+ readonly maxX: number;
9
+ readonly minY: number;
10
+ readonly maxY: number;
11
+ };
3
12
  /**
4
13
  * A two-dimensional nucleic acid structure drawing.
5
14
  */
@@ -81,6 +90,13 @@ export declare class Drawing {
81
90
  * by adjusting the height attribute of the SVG document that is the drawing.
82
91
  */
83
92
  set maxY(maxY: number);
93
+ /**
94
+ * Set the minimum and maximum X and Y coordinates of the drawing.
95
+ *
96
+ * Maintains the horizontal and vertical scalings of the drawing
97
+ * by adjusting the width and height attributes of the SVG document that is the drawing.
98
+ */
99
+ setBoundaries({ minX, maxX, minY, maxY }: Boundaries): void;
84
100
  /**
85
101
  * The width of the drawing in the coordinate system of the drawing
86
102
  * (i.e., the width of the view box of the SVG document that is the drawing).
@@ -199,4 +215,5 @@ export declare class Drawing {
199
215
  */
200
216
  appendSecondaryBond(sb: StraightBond<Nucleobase>): void;
201
217
  }
218
+ export {};
202
219
  //# sourceMappingURL=Drawing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawing.d.ts","sourceRoot":"","sources":["../src/Drawing.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;GAEG;AACH,qBAAa,OAAO;IAClB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,gBAAwB;IAExC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,IAAI,GAA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