You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added straight pathFunc option
* Added propType support and test for straight pathFunc
* Increased straightPath test coverage
* Minor syntax change to remove incorrect default pathFunc
@@ -84,7 +84,7 @@ class MyComponent extends React.Component {
84
84
|`onClick`|`func`|||`undefined`| Callback function to be called whenever a node is clicked. <br /><br /> The clicked node's data object is passed to the callback function as the first parameter. |
85
85
|`orientation`|`string` (enum) |`horizontal``vertical`||`horizontal`|`horizontal` - Tree expands left-to-right. <br /><br /> `vertical` - Tree expands top-to-bottom. |
86
86
|`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). |
87
-
|`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. |
87
+
|`pathFunc`|`string` (enum) |`diagonal``elbow``straight`||`diagonal`|`diagonal` - Renders smooth, curved edges between parent-child nodes. <br /><br /> `elbow` - Renders sharp edges at right angles between parent-child nodes. <br /><br /> `straight` - Renders straight lines between parent-child nodes.|
88
88
|`collapsible`|`bool`|||`true`| Toggles ability to collapse/expand the tree's nodes by clicking them. |
89
89
|`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. |
90
90
|`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. |
@@ -159,10 +159,10 @@ class MyComponent extends React.Component {
159
159
render() {
160
160
return (
161
161
{/* <Tree /> will fill width/height of its container; in this case `#treeWrapper` */}
0 commit comments