refactor(types)!: change node and edge types to extend element
* element type provides intersection interface of nodes and edges * rename isHidden to hidden Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+2
-17
@@ -1,36 +1,21 @@
|
||||
import { CSSProperties } from 'vue'
|
||||
import { ArrowHeadType, ElementId, Position } from './flow'
|
||||
import { EdgeTextProps, EdgeTypes } from './components'
|
||||
import { ArrowHeadType, ElementId, Position, Element } from './flow'
|
||||
import { GraphNode } from './node'
|
||||
|
||||
export interface Edge<T = any> {
|
||||
id: ElementId
|
||||
type?: EdgeTypes[number]
|
||||
export interface Edge<T = any> extends Element<T> {
|
||||
source: ElementId
|
||||
target: ElementId
|
||||
sourceHandle?: ElementId
|
||||
targetHandle?: ElementId
|
||||
selected?: boolean
|
||||
sourcePosition?: Position
|
||||
targetPosition?: Position
|
||||
label?:
|
||||
| string
|
||||
| {
|
||||
component: any
|
||||
props?: Record<string, any> & Partial<EdgeTextProps>
|
||||
}
|
||||
labelStyle?: any
|
||||
labelShowBg?: boolean
|
||||
labelBgStyle?: any
|
||||
labelBgPadding?: [number, number]
|
||||
labelBgBorderRadius?: number
|
||||
style?: CSSProperties | unknown
|
||||
animated?: boolean
|
||||
arrowHeadType?: ArrowHeadType
|
||||
markerEndId?: string
|
||||
data?: T
|
||||
class?: string
|
||||
isHidden?: boolean
|
||||
updatable?: boolean
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user