update: Add slots to CustomConnectionLine.vue, Edge.vue, Node.vue

This commit is contained in:
Braks
2021-10-20 22:39:54 +02:00
parent b3d276bfb8
commit 9d9a90e9a7
25 changed files with 363 additions and 391 deletions
+4 -5
View File
@@ -1,7 +1,8 @@
import { ElementId, RevueFlowStore, UpdateNodeInternals } from '../types'
import { ElementId, UpdateNodeInternals } from '~/types'
import { Store } from '~/context'
function useUpdateNodeInternals(): UpdateNodeInternals {
const store = inject<RevueFlowStore>('store')!
export default function (): UpdateNodeInternals {
const store = inject(Store)!
return (id: ElementId) => {
const nodeElement: HTMLDivElement | null = document.querySelector(`.revue-flow__node[data-id="${id}"]`)
@@ -11,5 +12,3 @@ function useUpdateNodeInternals(): UpdateNodeInternals {
}
}
}
export default useUpdateNodeInternals