update(examples): adapt examples

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 44f8eb1fe7
commit d730869443
8 changed files with 26 additions and 30 deletions
+2 -3
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { getBezierPath, getMarkerEnd } from '~/components/Edges/utils'
import { ArrowHeadType, getEdgeCenter, Position, EdgeText, EdgeProps } from '~/index'
import { getEdgeCenter, Position, EdgeText, EdgeProps } from '~/index'
interface CustomEdgeProps extends EdgeProps {
source: string
@@ -14,7 +14,6 @@ interface CustomEdgeProps extends EdgeProps {
targetY: number
sourcePosition: Position
targetPosition: Position
arrowHeadType?: ArrowHeadType
markerEndId?: string
data?: {
text: string
@@ -33,7 +32,7 @@ const edgePath = computed(() =>
targetPosition: props.targetPosition,
}),
)
const markerEnd = computed(() => getMarkerEnd(props.arrowHeadType, props.markerEndId))
const markerEnd = computed(() => getMarkerEnd(props.markerEnd, props.markerEndId))
const center = computed(() =>
getEdgeCenter({
sourceX: props.sourceX,