chore: update README
This commit is contained in:
@@ -6,10 +6,10 @@ __Custom edge that avoids crossing nodes__
|
||||
|
||||
```bash
|
||||
# install
|
||||
$ yarn add @vue-flow/core-pathfinding-edge
|
||||
$ yarn add @vue-flow/pathfinding-edge
|
||||
|
||||
# or
|
||||
$ npm i --save @vue-flow/core-pathfinding-edge
|
||||
$ npm i --save @vue-flow/pathfinding-edge
|
||||
```
|
||||
|
||||
## 🎮 Quickstart
|
||||
@@ -17,7 +17,7 @@ $ npm i --save @vue-flow/core-pathfinding-edge
|
||||
```vue
|
||||
<script setup>
|
||||
import { VueFlow, useVueFlow } from '@vue-flow/core'
|
||||
import { PathFindingEdge } from '@vue-flow/core-pathfinding-edge'
|
||||
import { PathFindingEdge } from '@vue-flow/pathfinding-edge'
|
||||
import initialElements from './initial-elements'
|
||||
|
||||
const elements = ref(initialElements)
|
||||
@@ -39,6 +39,15 @@ const { getNodes } = useVueFlow()
|
||||
```js
|
||||
// initial-elements.js
|
||||
export default [
|
||||
{
|
||||
id: 'e12',
|
||||
source: '1',
|
||||
target: '2',
|
||||
label: 'Smart Edge',
|
||||
style: { stroke: 'red' },
|
||||
// assign pathfinding edge type
|
||||
type: 'pathfinding'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
label: 'Node 1',
|
||||
@@ -55,14 +64,5 @@ export default [
|
||||
y: 90,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'e12',
|
||||
source: '1',
|
||||
target: '2',
|
||||
label: 'Smart Edge',
|
||||
style: { stroke: 'red' },
|
||||
// assign pathfinding edge type
|
||||
type: 'pathfinding'
|
||||
},
|
||||
]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user