feat(connection): Extend connection line props for more advanced usage
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+17
-3
@@ -1,7 +1,7 @@
|
||||
import { CSSProperties } from 'vue'
|
||||
import { BackgroundVariant, Dimensions, ElementId, FitViewParams, Position, XYPosition } from './flow'
|
||||
import { Connection } from './connection'
|
||||
import { Node } from './node'
|
||||
import { Connection, ConnectionLineType } from './connection'
|
||||
import { GraphNode, Node } from './node'
|
||||
|
||||
export type HandleType = 'source' | 'target'
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface ControlEvents {
|
||||
(event: 'interaction-change', active: boolean): void
|
||||
}
|
||||
|
||||
export type StringFunc = (node: Node) => string
|
||||
export type StringFunc = (node: Node | GraphNode) => string
|
||||
export type ShapeRendering = 'inherit' | 'auto' | 'geometricPrecision' | 'optimizeSpeed' | 'crispEdges' | undefined
|
||||
|
||||
export interface MiniMapProps {
|
||||
@@ -72,3 +72,17 @@ export interface EdgeTextProps {
|
||||
labelBgPadding?: [number, number]
|
||||
labelBgBorderRadius?: number
|
||||
}
|
||||
|
||||
interface CustomConnectionLineProps {
|
||||
sourceX: number
|
||||
sourceY: number
|
||||
sourcePosition: Position
|
||||
targetX: number
|
||||
targetY: number
|
||||
targetPosition: Position
|
||||
connectionLineType: ConnectionLineType
|
||||
connectionLineStyle: CSSProperties
|
||||
nodes: GraphNode[]
|
||||
sourceNode: GraphNode
|
||||
sourceHandle: HandleElement
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user