fix(edges): add props to smoothstep edge explicitly
* plugin doesn't allow for nested/extended types currently Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+44
-5
@@ -48,16 +48,21 @@ export interface Edge<T = any> extends Element<T> {
|
|||||||
updatable?: boolean
|
updatable?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GraphEdge<T = any> extends Edge<T> {
|
export interface GraphEdge<T = any, N = T> extends Edge<T> {
|
||||||
sourceNode: GraphNode
|
sourceNode: GraphNode<N>
|
||||||
targetNode: GraphNode
|
targetNode: GraphNode<N>
|
||||||
selected?: boolean
|
selected?: boolean
|
||||||
z?: number
|
z?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EdgeProps<Data = any> {
|
export interface EdgeProps<Data = any> {
|
||||||
id: string
|
id: string
|
||||||
label?: string
|
label?:
|
||||||
|
| string
|
||||||
|
| {
|
||||||
|
props?: any
|
||||||
|
component: any
|
||||||
|
}
|
||||||
type?: string
|
type?: string
|
||||||
data?: Data
|
data?: Data
|
||||||
class?: string
|
class?: string
|
||||||
@@ -87,7 +92,41 @@ export interface EdgeProps<Data = any> {
|
|||||||
markerEnd?: string
|
markerEnd?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SmoothStepEdgeProps<T = any> extends EdgeProps<T> {
|
export interface SmoothStepEdgeProps<Data = any> extends EdgeProps<Data> {
|
||||||
|
id: string
|
||||||
|
label?:
|
||||||
|
| string
|
||||||
|
| {
|
||||||
|
props?: any
|
||||||
|
component: any
|
||||||
|
}
|
||||||
|
type?: string
|
||||||
|
data?: Data
|
||||||
|
class?: string
|
||||||
|
style?: CSSProperties
|
||||||
|
hidden?: boolean
|
||||||
|
sourceX: number
|
||||||
|
sourceY: number
|
||||||
|
targetX: number
|
||||||
|
targetY: number
|
||||||
|
selected?: boolean
|
||||||
|
sourcePosition: Position
|
||||||
|
targetPosition: Position
|
||||||
|
sourceHandleId?: string
|
||||||
|
targetHandleId?: string
|
||||||
|
source: string
|
||||||
|
target: string
|
||||||
|
sourceHandle?: string
|
||||||
|
targetHandle?: string
|
||||||
|
labelStyle?: any
|
||||||
|
labelShowBg?: boolean
|
||||||
|
labelBgStyle?: any
|
||||||
|
labelBgPadding?: [number, number]
|
||||||
|
labelBgBorderRadius?: number
|
||||||
|
animated?: boolean
|
||||||
|
updatable?: boolean
|
||||||
|
markerStart?: string
|
||||||
|
markerEnd?: string
|
||||||
borderRadius?: number
|
borderRadius?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -39,7 +39,12 @@ export interface GraphNode<T = any> extends Node<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface NodeProps<T = any> {
|
export interface NodeProps<T = any> {
|
||||||
label?: string
|
label?:
|
||||||
|
| string
|
||||||
|
| {
|
||||||
|
props?: any
|
||||||
|
component: any
|
||||||
|
}
|
||||||
class?: string
|
class?: string
|
||||||
style?: CSSProperties
|
style?: CSSProperties
|
||||||
hidden?: boolean
|
hidden?: boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user