@rnacanvas/draw 2.24.1 → 3.0.1
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,55 @@
|
|
|
1
|
+
import { StraightBond } from '@rnacanvas/draw.bonds';
|
|
2
|
+
import { Nucleobase } from '@rnacanvas/draw.bases';
|
|
3
|
+
/**
|
|
4
|
+
* Currently is just a straight bond between two nucleobases.
|
|
5
|
+
*/
|
|
6
|
+
export type PrimaryBond = StraightBond<Nucleobase>;
|
|
7
|
+
/**
|
|
8
|
+
* A drawing of primary bonds.
|
|
9
|
+
*/
|
|
10
|
+
export declare class PrimaryBondsDrawing {
|
|
11
|
+
private svgDoc;
|
|
12
|
+
/**
|
|
13
|
+
* Default values for new primary bonds created by instances of this class
|
|
14
|
+
* (e.g., when adding a primary bond between a pair of bases).
|
|
15
|
+
*/
|
|
16
|
+
primaryBondDefaults: {
|
|
17
|
+
attributes: {
|
|
18
|
+
stroke: string;
|
|
19
|
+
'stroke-width': string;
|
|
20
|
+
};
|
|
21
|
+
basePadding1: number;
|
|
22
|
+
basePadding2: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Instances of this class wrap a bonds drawing.
|
|
26
|
+
*/
|
|
27
|
+
private bondsDrawing;
|
|
28
|
+
/**
|
|
29
|
+
* @param svgDoc The SVG document that is the drawing.
|
|
30
|
+
* @param primaryBonds The primary bonds in the drawing.
|
|
31
|
+
*/
|
|
32
|
+
constructor(svgDoc: SVGSVGElement, primaryBonds: PrimaryBond[]);
|
|
33
|
+
/**
|
|
34
|
+
* The primary bonds in the drawing.
|
|
35
|
+
*
|
|
36
|
+
* The ordering of primary bonds in the returned array is the ordering of primary bonds in the drawing.
|
|
37
|
+
*
|
|
38
|
+
* The returned array can be directly edited to change the order of primary bonds in the drawing
|
|
39
|
+
* and/or register/unregister primary bonds.
|
|
40
|
+
*/
|
|
41
|
+
get primaryBonds(): PrimaryBond[];
|
|
42
|
+
set primaryBonds(primaryBonds: PrimaryBond[]);
|
|
43
|
+
/**
|
|
44
|
+
* Appends the primary bond to the SVG document that is the drawing
|
|
45
|
+
* and to the drawing's array of primary bonds.
|
|
46
|
+
*/
|
|
47
|
+
append(primaryBond: PrimaryBond): void;
|
|
48
|
+
/**
|
|
49
|
+
* Creates a new primary bond between the two bases and appends it to the drawing.
|
|
50
|
+
*
|
|
51
|
+
* Returns the newly added primary bond.
|
|
52
|
+
*/
|
|
53
|
+
add(base1: Nucleobase, base2: Nucleobase): PrimaryBond;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=PrimaryBondsDrawing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimaryBondsDrawing.d.ts","sourceRoot":"","sources":["../src/PrimaryBondsDrawing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;AAEnD;;GAEG;AACH,qBAAa,mBAAmB;IAuBlB,OAAO,CAAC,MAAM;IAtB1B;;;OAGG;IACI,mBAAmB;;;;;;;MAOxB;IAEF;;OAEG;IACH,OAAO,CAAC,YAAY,CAA4B;IAEhD;;;OAGG;gBACiB,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE;IAItE;;;;;;;OAOG;IACH,IAAI,YAAY,IAAI,WAAW,EAAE,CAEhC;IAED,IAAI,YAAY,CAAC,YAAY,EAAE,WAAW,EAAE,EAE3C;IAED;;;OAGG;IACH,MAAM,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAKtC;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,WAAW;CAQvD"}
|