Skip to content

Commit

Permalink
chore(docs): cleanup deprecated functions
Browse files Browse the repository at this point in the history
Signed-off-by: braks <[email protected]>
  • Loading branch information
bcakmakoglu committed Jul 15, 2024
1 parent 4a8e2ac commit c19a514
Showing 1 changed file with 0 additions and 65 deletions.
65 changes: 0 additions & 65 deletions docs/src/guide/utils/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,71 +70,6 @@ const toggleClass = () => {
</template>
```

## [addEdge](/typedocs/functions/isEdge) (deprecated)

::: warning
In the composition API you should use [`addEdges`](/typedocs/types/AddEdges) of [`useVueFlow`](/guide/composables#usevueflow/)
:::

- Details:

Adds an edge to the elements array.

- Example:

```vue{12}
<script setup>
import { ref } from 'vue'
import { VueFlow, addEdge } from '@vue-flow/core'

const elements = ref([
{ id: '1', position: { x: 250, y: 5 } },
{ id: '2', position: { x: 100, y: 100 } },

{ id: 'e1-2', source: '1', target: '2' },
])

const onConnect = (params) => {
addEdge(params, elements.value)
}
</script>
<template>
<VueFlow v-model="elements" @connect="onConnect" />
</template>
```

## [updateEdge](/typedocs/functions/updateEdge-1) (deprecated)

::: warning
In the composition API you should use [`updateEdge`](/typedocs/types/UpdateEdge) of [`useVueFlow`](/guide/composables#usevueflow/)
:::

- Details:

Updates an edge to a new source or target node.

- Example:

```vue{12}
<script setup>
import { VueFlow, updateEdge } from '@vue-flow/core'

const elements = ref([
{ id: '1', label: 'Node 1', position: { x: 250, y: 5 } },
{ id: '2', label: 'Node 2', position: { x: 100, y: 100 } },

{ id: 'e1-2', source: '1', target: '2' },
])

const onEdgeUpdate = ({ edge, connection }) => {
elements.value = updateEdge(edge, connection, elements.value)
}
</script>
<template>
<VueFlow v-model="elements" @edge-update="onEdgeUpdate" />
</template>
```

## [getOutgoers](/typedocs/functions/getOutgoers)

- Details:
Expand Down

0 comments on commit c19a514

Please sign in to comment.