refactor(types)!: Remove ElementId type

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 fe0eeaeae9
commit f00f34d84b
28 changed files with 99 additions and 150 deletions
+7 -12
View File
@@ -1,13 +1,13 @@
<script lang="ts" setup>
import { CSSProperties } from 'vue'
import { ArrowHeadType, EdgeProps, EdgeTextProps, ElementId, Position } from '../../types'
import { ArrowHeadType, EdgeProps, Position } from '../../types'
import EdgeText from './EdgeText.vue'
import { getMarkerEnd, getBezierPath } from './utils'
interface StraightEdgeProps extends EdgeProps {
id: ElementId
source: ElementId
target: ElementId
id: string
source: string
target: string
sourceX: number
sourceY: number
targetX: number
@@ -16,12 +16,7 @@ interface StraightEdgeProps extends EdgeProps {
animated?: boolean
sourcePosition: Position
targetPosition: Position
label?:
| string
| {
component: any
props?: Record<string, any> & Partial<EdgeTextProps>
}
label?: string
labelStyle?: CSSProperties
labelShowBg?: boolean
labelBgStyle?: CSSProperties
@@ -29,8 +24,8 @@ interface StraightEdgeProps extends EdgeProps {
labelBgBorderRadius?: number
arrowHeadType?: ArrowHeadType
markerEndId?: string
sourceHandleId?: ElementId | null
targetHandleId?: ElementId | null
sourceHandleId?: string
targetHandleId?: string
}
const props = withDefaults(defineProps<StraightEdgeProps>(), {