-
diff --git a/docs/src/guide/theming.md b/docs/src/guide/theming.md
index 82e23227..a011cfa8 100644
--- a/docs/src/guide/theming.md
+++ b/docs/src/guide/theming.md
@@ -91,9 +91,10 @@ Below are a couple of examples on how you can do this:
Directly styling the Vue Flow component:
-```vue{3-4}
+```vue{4-5}
@@ -108,8 +109,8 @@ Styling nodes/edges with a style or class attribute:
const nodes = ref([
{
id: '1',
- label: 'Node 1',
position: { x: 250, y: 5 },
+ data: { label: 'Node 1' },
// Add a class name to the node
class: 'my-custom-node-class',
@@ -140,11 +141,11 @@ These alterations can be implemented either on a global scale or to individual e
```
```js{6-7} []
-const elements = ref([
+const nodes = ref([
{
id: '1',
- label: 'Node 1',
position: { x: 100, y: 100 },
+ data: { label: 'Node 1' },
/* Overriding the `--vf-node-color` variable to change node border, box-shadow and handle color */
style: { '--vf-node-color': 'blue' }
},
diff --git a/docs/src/guide/troubleshooting.md b/docs/src/guide/troubleshooting.md
index 10016439..7b790189 100644
--- a/docs/src/guide/troubleshooting.md
+++ b/docs/src/guide/troubleshooting.md
@@ -18,7 +18,7 @@ Vue Flow can emit several error types to help diagnose and resolve issues.
-
+
```
diff --git a/docs/src/guide/utils/graph.md b/docs/src/guide/utils/graph.md
index d599bda3..f6e27dbf 100644
--- a/docs/src/guide/utils/graph.md
+++ b/docs/src/guide/utils/graph.md
@@ -13,8 +13,8 @@
import { VueFlow, isEdge } 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: '1', position: { x: 250, y: 5 }, },
+ { id: '2', position: { x: 100, y: 100 }, },
{ id: 'e1-2', source: '1', target: '2', class: 'light' },
])
@@ -27,9 +27,10 @@ const toggleClass = () => {
})
}
+
-
+
```
@@ -61,33 +62,34 @@ const toggleClass = () => {
})
}
+
-
+
```
-## [addEdge](/typedocs/functions/isEdge)
+## [addEdge](/typedocs/functions/isEdge) (deprecated)
::: warning
-In the composition API you should use [`addEdges`](/typedocs/types/AddEdges)
-of [`useVueFlow`](/guide/composables#usevueflow/)
+In the composition API you should use [`addEdges`](/typedocs/types/AddEdges) of [`useVueFlow`](/guide/composables#usevueflow/)
:::
- Details:
- Confirms if an element is a node.
+ Adds an edge to the elements array.
- Example:
```vue{12}