From 076ff4ce547ccd1bd6ba3e0b4a1015b6516721c6 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 11 Dec 2021 12:24:29 +0100 Subject: [PATCH] refactor(nodes): use plugin to import prop interface Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- examples/Basic/Basic.vue | 8 +++--- src/components/Nodes/DefaultNode.vue | 21 ++++---------- src/components/Nodes/InputNode.vue | 17 ++++------- src/components/Nodes/NodeWrapper.vue | 42 ++++++++++++++++++++++------ src/components/Nodes/OutputNode.vue | 17 ++++------- src/types/node.ts | 23 +++++++++------ 6 files changed, 68 insertions(+), 60 deletions(-) diff --git a/examples/Basic/Basic.vue b/examples/Basic/Basic.vue index 3c947c78..86ea3444 100644 --- a/examples/Basic/Basic.vue +++ b/examples/Basic/Basic.vue @@ -16,10 +16,10 @@ import { const onNodeDragStop = (e) => console.log('drag stop', e) const onElementClick = (e) => console.log('click', e) const nodes = ref([ - { id: '1', type: 'input', data: { label: 'Node 1' }, position: { x: 250, y: 5 } }, - { id: '2', data: { label: 'Node 2' }, position: { x: 100, y: 100 } }, - { id: '3', data: { label: 'Node 3' }, position: { x: 400, y: 100 } }, - { id: '4', data: { label: 'Node 4' }, position: { x: 400, y: 200 } }, + { id: '1', type: 'input', label: 'Node 1', position: { x: 250, y: 5 } }, + { id: '2', label: 'Node 2', position: { x: 100, y: 100 } }, + { id: '3', label: 'Node 3', position: { x: 400, y: 100 } }, + { id: '4', label: 'Node 4', position: { x: 400, y: 200 } }, ]) const edges = ref([]) const vfInstance = ref() diff --git a/src/components/Nodes/DefaultNode.vue b/src/components/Nodes/DefaultNode.vue index cfcf6fe2..2c3e9741 100644 --- a/src/components/Nodes/DefaultNode.vue +++ b/src/components/Nodes/DefaultNode.vue @@ -1,21 +1,13 @@