From 78f9ee1cb77cc00590b8d4529da7cd124ddfc0f6 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Mon, 10 Oct 2022 19:50:50 +0200 Subject: [PATCH] chore: add changeset --- .changeset/eight-pears-peel.md | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .changeset/eight-pears-peel.md diff --git a/.changeset/eight-pears-peel.md b/.changeset/eight-pears-peel.md new file mode 100644 index 00000000..700cd7ed --- /dev/null +++ b/.changeset/eight-pears-peel.md @@ -0,0 +1,64 @@ +--- +'@vue-flow/core': patch +--- + +# What's changed? + +* Add `HandleConnectable` type +* Update `connectable` prop of `Handle` to `HandleConnectable` type +* Allow to specify if Handles are connectable + * any number of connections + * none + * single connection + * or a cb to determine whether the Handle is connectable + +Example: +```html + + +``` + +* Update `node.connectable` prop to `HandleConnectable` + +For Example: +```js +const nodes = ref([ + { + id: '1', + position: { x: 0, y: 0 }, + connectable: 'single' // each handle is only connectable once (default node for example) + }, + { + id: '2', + position: { x: 200, y: 0 }, + connectable: (node, connectedEdges) => { + return true // will allow any number of connections + } + }, + { + id: '3', + position: { x: 400, y: 0 }, + connectable: true // will allow any number of connections + }, + { + id: '4', + position: { x: 200, y: 0 }, + connectable: false // will disable handles + } +]) +```