Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 0f8bb8c

Browse files
author
James Collier
committed
Update the documentation for the current release.
1 parent f6e74de commit 0f8bb8c

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

README.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,28 @@ const mol = {
5454
{ "x": 2.049, "y": -3.0, "element": "H" }
5555
],
5656
"bonds": [
57-
{ "atoms": [3, 6], "bond": "UNIMPL" },
58-
{ "atoms": [11, 2], "bond": "SINGLE" },
59-
{ "atoms": [0, 12], "bond": "SINGLE" },
60-
{ "atoms": [1, 13], "bond": "SINGLE" },
61-
{ "atoms": [4, 14], "bond": "SINGLE" },
62-
{ "atoms": [5, 15], "bond": "SINGLE" },
63-
{ "atoms": [7, 16], "bond": "SINGLE" },
64-
{ "atoms": [8, 17], "bond": "SINGLE" },
65-
{ "atoms": [9, 18], "bond": "SINGLE" },
66-
{ "atoms": [10, 19], "bond": "SINGLE" },
67-
{ "atoms": [0, 1, 2, 3, 4, 5], "bond": "AROMATIC" },
68-
{ "atoms": [6, 7, 8, 9, 10, 11], "bond": "AROMATIC" }
57+
{ "atoms": [[3, 6, "UNIMPL" ]] },
58+
{ "atoms": [[11, 2, "SINGLE"]] },
59+
{ "atoms": [[0, 12, "SINGLE"]] },
60+
{ "atoms": [[1, 13, "SINGLE"]] },
61+
{ "atoms": [[4, 14, "SINGLE"]] },
62+
{ "atoms": [[5, 15, "SINGLE"]] },
63+
{ "atoms": [[7, 16, "SINGLE"]] },
64+
{ "atoms": [[8, 17, "SINGLE"]] },
65+
{ "atoms": [[9, 18, "SINGLE"]] },
66+
{ "atoms": [[10, 19, "SINGLE"]] },
67+
{ "atoms": [[0, 1, "SINGLE"],
68+
[1, 2, "DOUBLE"],
69+
[2, 3, "SINGLE"],
70+
[3, 4, "DOUBLE"],
71+
[4, 5, "SINGLE"],
72+
[5, 0, "DOUBLE"]], "key": "RING" },
73+
{ "atoms": [[6, 7, "SINGLE"],
74+
[7, 8, "DOUBLE"],
75+
[8, 9, "SINGLE"],
76+
[9, 10, "DOUBLE"],
77+
[10, 11, "SINGLE"],
78+
[11, 6, "DOUBLE"]], "key": "RING" }
6979
]
7080
};
7181

@@ -87,7 +97,12 @@ This is rendered as:
8797
* `translateX: number` Translate the whole image on the X axis (default: `0`).
8898
* `translateY: number` Translate the whole image on the Y axis (default: `0`).
8999
* `scale: number` Scale the whole image by some fraction (default: `1`).
100+
* `width: number` The width of the drawing area in pixels (default: `100`).
101+
* `height: number` The height of the drawing area in pixels (default: `100`).
102+
* `labelTranslateX: number` Translate each atom label, in the x direction, by this number of pixels (default: `0`).
103+
* `labelTranslateY: number` Translate each atom label, in the y direction, by this number of pixels (default: `0`).
90104
* `atomClicked: (index: number) => void` A callback function accepting the index of the clicked atom.
105+
* `atomLabel: (atom: Atom, index: number) => string` A callback function defining the text to display in the label for the given atom.
91106
* `atomStyle: (element: string, selected: boolean): React.CSSProperties` A hook specifying CSS styles for the SVG `<circle>`.
92107
* `atomLabelStyle: (element: string, selected: boolean): React.CSSProperties` A hook specifying CSS styles for the SVG `<text>`.
93108

0 commit comments

Comments
 (0)