Closed AnoOnion closed 2 years ago
How are you mounting drawflow?
And the node?
Vue2 or Vue3?
onMounted(() => {
let layout = document.getElementById('tracking-flow')
editor.value = new Drawflow(layout, vue, instance.appContext.app._context)
editor.reroute = true
editor.start()
editor.registerNode('branchnode', BranchNode)
editor.addNode('main-address', 0, 1, 0, 190, 'branch-node', { 'data': 'test' }, 'branchnode', 'vue')
})
is it correct to use dragflow ? i use vue 3
I understand that vuex is added to the instance.
You can see an example of vue3 https://github.com/jerosoler/drawflow-vue3-example
View app component: https://github.com/jerosoler/drawflow-vue3-example/blob/master/src/components/drawflow.vue
And Node component: https://github.com/jerosoler/drawflow-vue3-example/blob/master/src/components/nodes/node1.vue
Gettin the instance:
df = getCurrentInstance().appContext.config.globalProperties.$df.value;
wow, it worked 💯
ooh, one more thing, when I create a node with a height of 100px and when that node is selected then the height will change to 200px
but the connection position does not adjust, how so that when the height of the selected node changes, the connection position adjusts accordingly?
thanks for seeing this before
Force update connections with:
updateConnectionNodes('node-'+id);
Thank you very much, i will try it tomorrow 👍
i want to access the getters function in the component that i have registered, but i get an error like :
do you have a solution? thanks