feat(nodes): nested boundaries

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent f00f34d84b
commit 3f0b0dbd70
8 changed files with 165 additions and 109 deletions
-1
View File
@@ -19,7 +19,6 @@ store.hooks.nodeDragStop.on(({ node }) => {
node.data.label = `In ${props.id}`
node.data.group = props.id
} else if (node.data.group === props.id) {
console.log(node)
node.data.group = undefined
node.data.label = node.id
}
+8 -3
View File
@@ -3,12 +3,17 @@ import GroupNode from './GroupNode.vue'
import { VueFlow, Elements, Node, Edge, Connection, addEdge } from '~/index'
const elements = ref<Elements<{ label: string; group?: string }>>([
{ id: 'node-1', data: { label: 'node-1', group: undefined }, position: { x: 250, y: 5 } },
{
id: 'node-1',
data: { label: 'node-1', group: undefined },
position: { x: 250, y: 5 },
parentNode: 'group-a',
extent: 'parent',
},
{ id: 'node-2', data: { label: 'node-2', group: undefined }, position: { x: 50, y: 5 } },
{
id: 'group-a',
type: 'group-a',
style: { zIndex: 2 },
style: { zIndex: 2, width: '300px', height: '300px' },
selectable: false,
data: { label: 'A' },
position: { x: 50, y: 100 },