fix: typings

This commit is contained in:
Braks
2021-10-22 14:29:27 +02:00
parent cb96b1ab00
commit 6ec8258f33
50 changed files with 165 additions and 142 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ const edges = computed(() => store.edges.filter((edge) => !edge.isHidden))
</Edge>
</template>
<ConnectionLine
v-if="connectionLineVisible"
v-if="connectionLineVisible && sourceNode"
:source-node="sourceNode"
:connection-line-style="props.connectionLineStyle"
:connection-line-type="props.connectionLineType"
+4 -4
View File
@@ -26,10 +26,10 @@ export function createEdgeTypes(edgeTypes: Record<string, EdgeType>): Record<str
}
export function getHandlePosition(position: Position, node: Node, handle: any | null = null): XYPosition {
const x = (handle?.x || 0) + node.__rf.position.x
const y = (handle?.y || 0) + node.__rf.position.y
const width = handle?.width || node.__rf.width
const height = handle?.height || node.__rf.height
const x = (handle?.x || 0) + node.__rf?.position?.x
const y = (handle?.y || 0) + node.__rf?.position?.y
const width = handle?.width || node.__rf?.width
const height = handle?.height || node.__rf?.height
switch (position) {
case Position.Top: