- import { Handle, HandleConnectable } from '@vue-flow/core'
+ import { Handle, HandleConnectable } from "@vue-flow/core";
const handleConnectable: HandleConnectable = (node, connectedEdges) => {
- console.log(node, connectedEdges)
- return true
- }
+ console.log(node, connectedEdges);
+ return true;
+ };
@@ -916,28 +974,28 @@ Additionally, nodes can be moved using keyboard controls (Arrow-Keys).
```js
const nodes = ref([
{
- id: '1',
+ id: "1",
position: { x: 0, y: 0 },
- connectable: 'single', // each handle is only connectable once (default node for example)
+ connectable: "single", // each handle is only connectable once (default node for example)
},
{
- id: '2',
+ id: "2",
position: { x: 200, y: 0 },
connectable: (node, connectedEdges) => {
- return true // will allow any number of connections
+ return true; // will allow any number of connections
},
},
{
- id: '3',
+ id: "3",
position: { x: 400, y: 0 },
connectable: true, // will allow any number of connections
},
{
- id: '4',
+ id: "4",
position: { x: 200, y: 0 },
connectable: false, // will disable handles
},
- ])
+ ]);
```
### Patch Changes
@@ -949,7 +1007,7 @@ Additionally, nodes can be moved using keyboard controls (Arrow-Keys).
```vue
@@ -976,21 +1034,28 @@ Additionally, nodes can be moved using keyboard controls (Arrow-Keys).
```vue
@@ -1002,22 +1067,22 @@ Additionally, nodes can be moved using keyboard controls (Arrow-Keys).
```vue
@@ -1046,22 +1111,22 @@ Additionally, nodes can be moved using keyboard controls (Arrow-Keys).
Before:
```js
- import { getBezierPath, getEdgeCenter } from '@braks/vue-flow'
+ import { getBezierPath, getEdgeCenter } from "@braks/vue-flow";
// used to return the path string only
- const edgePath = computed(() => getBezierPath(pathParams))
+ const edgePath = computed(() => getBezierPath(pathParams));
// was necessary to get the centerX, centerY of an edge
- const centered = computed(() => getEdgeCenter(centerParams))
+ const centered = computed(() => getEdgeCenter(centerParams));
```
After:
```js
- import { getBezierPath } from '@vue-flow/core'
+ import { getBezierPath } from "@vue-flow/core";
// returns the path string and the center positions
- const [path, centerX, centerY] = computed(() => getBezierPath(pathParams))
+ const [path, centerX, centerY] = computed(() => getBezierPath(pathParams));
```
- [#305](https://github.com/bcakmakoglu/vue-flow/pull/305) [`47d837aa`](https://github.com/bcakmakoglu/vue-flow/commit/47d837aac096e59e7f55213990dff2cc7eba0c01) Thanks [@bcakmakoglu](https://github.com/bcakmakoglu)! - # What's changed?
@@ -1096,12 +1161,16 @@ Additionally, nodes can be moved using keyboard controls (Arrow-Keys).
Before:
```js
- import { VueFlow, Background, MiniMap, Controls } from '@braks/vue-flow'
+ import { VueFlow, Background, MiniMap, Controls } from "@braks/vue-flow";
```
After
```js
- import { VueFlow } from '@vue-flow/core'
- import { Background, MiniMap, Controls } from '@vue-flow/additional-components'
+ import { VueFlow } from "@vue-flow/core";
+ import {
+ Background,
+ MiniMap,
+ Controls,
+ } from "@vue-flow/additional-components";
```
diff --git a/packages/core/package.json b/packages/core/package.json
index 2a3ffa37..6360c724 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@vue-flow/core",
- "version": "1.14.3",
+ "version": "1.15.0",
"private": false,
"license": "MIT",
"author": "Burak Cakmakoglu<78412429+bcakmakoglu@users.noreply.github.com>",