chore(core): correct action name

This commit is contained in:
braks
2022-11-04 23:44:11 +01:00
committed by Braks
parent a19b4581a7
commit 8a51391c31
3 changed files with 18 additions and 3 deletions
+15
View File
@@ -3,3 +3,18 @@
---
Add intersection utils to help with checking if a node intersects with either other nodes or a given area
### Usage
```js
const { onNodeDrag, getIntersectingNodes, getNodes } = useVueFlow()
onNodeDrag(({ node }) => {
const intersections = getIntersectingNodes(node).map((n) => n.id)
getNodes.value.forEach((n) => {
// highlight nodes that are intersecting with the dragged node
n.class = intersections.includes(n.id) ? 'highlight' : ''
})
})
```