update: Add injection keys

This commit is contained in:
Braks
2021-10-20 22:39:54 +02:00
parent 1853c21353
commit a895853b64
19 changed files with 113 additions and 133 deletions
+3 -10
View File
@@ -4,15 +4,8 @@ import { getSourceTargetNodes } from './utils'
import MarkerDefinitions from './MarkerDefinitions.vue'
import Edge from '~/components/Edges/Edge.vue'
import ConnectionLine from '~/components/ConnectionLine/ConnectionLine.vue'
import {
ConnectionLineType,
ConnectionMode,
CustomConnectionLine,
Dimensions,
EdgeType,
RevueFlowStore,
Transform,
} from '~/types'
import { ConnectionLineType, ConnectionMode, CustomConnectionLine, Dimensions, EdgeType, Transform } from '~/types'
import { Store } from '~/context/symbols'
interface EdgeRendererProps {
edgeTypes: Record<string, EdgeType>
@@ -36,7 +29,7 @@ const props = withDefaults(defineProps<EdgeRendererProps>(), {
connectionLineType: ConnectionLineType.Bezier,
})
const store = inject<RevueFlowStore>('store')!
const store = inject(Store)!
const sourceNode = computed(() => store.nodes.find((n) => n.id === store.connectionNodeId))
const connectionLineVisible = computed(