Skip to content

Commit d380992

Browse files
committed
Merge branch 'release/v0.3.0'
2 parents ea013a9 + 2001c4c commit d380992

File tree

6 files changed

+50
-22
lines changed

6 files changed

+50
-22
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ class MyComponent extends Component {
6666
```
6767

6868
## Props
69-
| Property | Type | Options | Required? | Default | Description |
70-
|----------------|-----------------|-------------------------|-----------|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
71-
| `data` | `array` | | required | `undefined` | Single-element array containing hierarchical object (see `myTreeData` above); contains (at least) `name` and `parent` keys. |
72-
| `orientation` | `string` (enum) | `horizontal` `vertical` | | `horizontal` | `horizontal` - Tree expands left-to-right. `vertical` - Tree expands top-to-bottom |
73-
| `translate` | `object` | | | `{x: 0, y: 0}` | Translates the graph along the x/y axis by the specified amount of pixels (avoids the graph being stuck in the top left canvas corner) |
74-
| `pathFunc` | `string` (enum) | `diagonal` `elbow` | | `diagonal` | `diagonal` - Renders smooth, curved edges between parent-child nodes. `elbow` - Renders sharp edges at right angles between parent-child nodes |
75-
| `collapsible` | `bool` | | | `true` | Toggles ability to collapse/expand the tree's nodes by clicking them |
76-
| `initialDepth` | `number` | `0` or greater | | `undefined` | Sets the maximum node depth to which the tree is expanded on its initial render; tree renders to full depth if prop is omitted. |
77-
| `zoomable` | `bool` | | | `true` | Toggles ability to zoom in/out on the Tree by scaling the SVG element according to `props.scaleExtent` |
78-
| `scaleExtent` | `object` | | | `{min: 0.1, max: 1}` | Sets the minimum/maximum extent to which the tree can be scaled if `props.zoomable` is true |
69+
| Property | Type | Options | Required? | Default | Description |
70+
|----------------|-----------------|-------------------------|-----------|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
71+
| `data` | `array` | | required | `undefined` | Single-element array containing hierarchical object (see `myTreeData` above). <br /> Contains (at least) `name` and `parent` keys. |
72+
| `orientation` | `string` (enum) | `horizontal` `vertical` | | `horizontal` | `horizontal` - Tree expands left-to-right. <br /><br /> `vertical` - Tree expands top-to-bottom. |
73+
| `translate` | `object` | | | `{x: 0, y: 0}` | Translates the graph along the x/y axis by the specified amount of pixels (avoids the graph being stuck in the top left canvas corner). |
74+
| `pathFunc` | `string` (enum) | `diagonal` `elbow` | | `diagonal` | `diagonal` - Renders smooth, curved edges between parent-child nodes. <br /><br /> `elbow` - Renders sharp edges at right angles between parent-child nodes. |
75+
| `collapsible` | `bool` | | | `true` | Toggles ability to collapse/expand the tree's nodes by clicking them. |
76+
| `initialDepth` | `number` | `0..n` | | `undefined` | Sets the maximum node depth to which the tree is expanded on its initial render. <br /> Tree renders to full depth if prop is omitted. |
77+
| `zoomable` | `bool` | | | `true` | Toggles ability to zoom in/out on the Tree by scaling the SVG element according to `props.scaleExtent`. |
78+
| `scaleExtent` | `object` | | | `{min: 0.1, max: 1}` | Sets the minimum/maximum extent to which the tree can be scaled if `props.zoomable` is true. |
79+
| `depthFactor` | `number` | `-n..0..n` | | `undefined` | Ensures the tree takes up a fixed amount of space (`node.y = node.depth * depthFactor`), regardless of tree depth. <br /> **TIP**: Negative values invert the tree's direction. |

0 commit comments

Comments
 (0)