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
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ Check out the examples:
35
35
*[Click to focus on node](https://vasturiano.github.io/react-force-graph/example/click-to-focus/) ([source](https://github.com/vasturiano/react-force-graph/blob/master/example/click-to-focus/index.html))
*[Emit link particles on demand](https://vasturiano.github.io/react-force-graph/example/emit-particles/) ([source](https://github.com/vasturiano/react-force-graph/blob/master/example/emit-particles/index.html))
38
39
*[Force-directed tree (DAG mode)](https://vasturiano.github.io/react-force-graph/example/tree/) ([source](https://github.com/vasturiano/react-force-graph/blob/master/example/tree/index.html))
39
40
40
41
## Quick start
@@ -134,6 +135,10 @@ Note that not all props listed below apply to all 3 components. The last 3 colum
134
135
| <b>linkDirectionalParticleColor</b> | <i>string</i> or <i>func</i> |`color`| Link object accessor function or attribute for the directional particles color. |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
135
136
| <b>linkDirectionalParticleResolution</b> | <i>number</i> | 4 | Geometric resolution of each 3D directional particle, expressed in how many slice segments to divide the circumference. Higher values yield smoother particles. ||:heavy_check_mark:|:heavy_check_mark:|
| <b>emitParticle</b> | (<i>link</i>) | An alternative mechanism for generating particles, this method emits a non-cyclical single particle within a specific link. The emitted particle shares the styling (speed, width, color) of the regular particle props. A valid `link` object that is included in `graphData` should be passed as a single parameter. |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
141
+
137
142
### Render control
138
143
139
144
| Prop | Type | Default | Description |
@@ -185,6 +190,8 @@ Note that not all props listed below apply to all 3 components. The last 3 colum
185
190
| <b>onLinkClick</b> | <i>func</i> |*-*| Callback function for link (left-button) clicks. The link object is included as single argument `onLinkClick(link)`. |:heavy_check_mark:|:heavy_check_mark:||
186
191
| <b>onLinkRightClick</b> | <i>func</i> |*-*| Callback function for link right-clicks. The link object is included as single argument `onLinkRightClick(link)`. |:heavy_check_mark:|:heavy_check_mark:||
187
192
| <b>onLinkHover</b> | <i>func</i> |*-*| Callback function for link mouse over events. The link object (or `null` if there's no link under the mouse line of sight) is included as the first argument, and the previous link object (or null) as second argument: `onLinkHover(link, prevLink)`. |:heavy_check_mark:|:heavy_check_mark:||
193
+
| <b>onBackgroundClick</b> | <i>func</i> |*-*| Callback function for click events on the empty space between the nodes and links. |:heavy_check_mark:|:heavy_check_mark:||
194
+
| <b>onBackgroundRightClick</b> | <i>func</i> |*-*| Callback function for right-click events on the empty space between the nodes and links. |:heavy_check_mark:|:heavy_check_mark:||
188
195
| <b>linkHoverPrecision</b> | <i>number</i> | 4 | Whether to display the link label when gazing the link closely (low value) or from far away (high value). |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
189
196
| <b>onZoom</b> | <i>func</i> |*-*| Callback function for zoom/pan events. The current zoom transform is included as single argument `onZoom({ k, x, y })`. Note that `onZoom` is triggered by user interaction as well as programmatic zooming/panning with `zoom()` and `centerAt()`. |:heavy_check_mark:|||
190
197
| <b>controlType</b> | <i>string</i> |`trackball`| Which type of control to use to control the camera on 3D mode. Choice between [trackball](https://threejs.org/examples/misc_controls_trackball.html), [orbit](https://threejs.org/examples/#misc_controls_orbit) or [fly](https://threejs.org/examples/misc_controls_fly.html). ||:heavy_check_mark:||
0 commit comments