Skip to content

Commit

Permalink
fix(edges): type marker prop in EdgeProps
Browse files Browse the repository at this point in the history
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
  • Loading branch information
bcakmakoglu committed Dec 6, 2022
1 parent aed0845 commit 029394e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/thin-fishes-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vue-flow/core': patch
---

Type `markerEnd` and `markerStart` in `EdgeProps`
1 change: 1 addition & 0 deletions packages/core/src/components/Edges/EdgeWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ const EdgeWrapper = defineComponent({
targetNode: props.targetNode,
source: edge.source,
target: edge.target,
type: edge.type,
updatable: props.updatable,
selected: edge.selected,
animated: edge.animated,
Expand Down
11 changes: 5 additions & 6 deletions packages/core/src/types/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export interface EdgeProps<Data = ElementData, CustomEvents = {}> {
id: string
sourceNode: GraphNode
targetNode: GraphNode
type?: keyof DefaultEdgeTypes | string
label?: string | VNode | Component<EdgeTextProps> | Object
type?: string
style?: CSSProperties
sourceX: number
sourceY: number
Expand All @@ -144,8 +144,8 @@ export interface EdgeProps<Data = ElementData, CustomEvents = {}> {
labelBgBorderRadius?: number
animated?: boolean
updatable?: boolean
markerStart?: string
markerEnd?: string
markerStart: string
markerEnd: string
curvature?: number
interactionWidth?: number
data: Data
Expand All @@ -159,7 +159,6 @@ export interface SmoothStepEdgeProps<Data = ElementData, CustomEvents = {}> exte
sourceNode: GraphNode
targetNode: GraphNode
label?: string | VNode | Component<EdgeTextProps> | Object
type?: string
style?: CSSProperties
sourceX: number
sourceY: number
Expand All @@ -179,8 +178,8 @@ export interface SmoothStepEdgeProps<Data = ElementData, CustomEvents = {}> exte
labelBgBorderRadius?: number
animated?: boolean
updatable?: boolean
markerStart?: string
markerEnd?: string
markerStart: string
markerEnd: string
borderRadius?: number
offset?: number
interactionWidth?: number
Expand Down
8 changes: 4 additions & 4 deletions packages/pathfinding-edge/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export interface PathFindingEdgeProps extends EdgeProps<never> {
labelBgPadding?: [number, number]
labelBgBorderRadius?: number
style?: CSSProperties
markerEnd?: string
markerStart?: string
markerEnd: string
markerStart: string
sourceHandleId?: string
targetHandleId?: string
}
Expand All @@ -46,8 +46,8 @@ export interface PerfectArrowProps {
labelBgPadding?: [number, number]
labelBgBorderRadius?: number
style?: CSSProperties
markerEnd?: string
markerStart?: string
markerEnd: string
markerStart: string
sourceHandleId?: string
targetHandleId?: string
options?: ArrowOptions
Expand Down

0 comments on commit 029394e

Please sign in to comment.