@rnacanvas/draw 3.2.0 → 3.2.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 SecondaryBond = StraightBond<Nucleobase>;
|
|
7
|
+
/**
|
|
8
|
+
* A drawing of secondary bonds.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SecondaryBondsDrawing {
|
|
11
|
+
private svgDoc;
|
|
12
|
+
/**
|
|
13
|
+
* Default values for new secondary bonds created by a secondary bonds drawing
|
|
14
|
+
* (e.g., when calling the `add` method of a secondary bonds drawing).
|
|
15
|
+
*/
|
|
16
|
+
secondaryBondDefaults: {
|
|
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 secondaryBonds The secondary bonds in the drawing.
|
|
31
|
+
*/
|
|
32
|
+
constructor(svgDoc: SVGSVGElement, secondaryBonds: SecondaryBond[]);
|
|
33
|
+
/**
|
|
34
|
+
* The secondary bonds in the drawing.
|
|
35
|
+
*
|
|
36
|
+
* The ordering of secondary bonds in the returned array is the ordering of secondary bonds in the drawing.
|
|
37
|
+
*
|
|
38
|
+
* The returned array can be directly edited to change the order of secondary bonds in the drawing
|
|
39
|
+
* and/or register/unregister secondary bonds.
|
|
40
|
+
*/
|
|
41
|
+
get secondaryBonds(): SecondaryBond[];
|
|
42
|
+
set secondaryBonds(secondaryBonds: SecondaryBond[]);
|
|
43
|
+
/**
|
|
44
|
+
* Appends the secondary bond to the SVG document that is the drawing
|
|
45
|
+
* and to the drawing's array of secondary bonds.
|
|
46
|
+
*/
|
|
47
|
+
append(secondaryBond: SecondaryBond): void;
|
|
48
|
+
/**
|
|
49
|
+
* Creates a new secondary bond between the two bases and appends it to the drawing.
|
|
50
|
+
*
|
|
51
|
+
* Returns the newly added secondary bond.
|
|
52
|
+
*/
|
|
53
|
+
add(base1: Nucleobase, base2: Nucleobase): SecondaryBond;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=SecondaryBondsDrawing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecondaryBondsDrawing.d.ts","sourceRoot":"","sources":["../src/SecondaryBondsDrawing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;AAErD;;GAEG;AACH,qBAAa,qBAAqB;IAuBpB,OAAO,CAAC,MAAM;IAtB1B;;;OAGG;IACI,qBAAqB;;;;;;;MAO1B;IAEF;;OAEG;IACH,OAAO,CAAC,YAAY,CAA8B;IAElD;;;OAGG;gBACiB,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE;IAI1E;;;;;;;OAOG;IACH,IAAI,cAAc,IAAI,aAAa,EAAE,CAEpC;IAED,IAAI,cAAc,CAAC,cAAc,EAAE,aAAa,EAAE,EAEjD;IAED;;;OAGG;IACH,MAAM,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;IAK1C;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,aAAa;CAQzD"}
|