Skip to content

Commit 44b9232

Browse files
committed
refactor(core): inherit attrs on edge path el in BaseEdge (#1742)
* refactor(core): inherit attrs on edge path el in base edge Signed-off-by: braks <[email protected]> * chore(changeset): add Signed-off-by: braks <[email protected]> --------- Signed-off-by: braks <[email protected]>
1 parent 0a0d8af commit 44b9232

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.changeset/stale-radios-listen.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/core": minor
3+
---
4+
5+
Inherit attributes on main edge path element in BaseEdge component.

packages/core/src/components/Edges/BaseEdge.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ref, useAttrs } from 'vue'
33
import type { BaseEdgeProps } from '../../types'
44
import EdgeText from './EdgeText.vue'
55
6-
const { interactionWidth = 20, labelShowBg = true, ...props } = defineProps<BaseEdgeProps>()
6+
withDefaults(defineProps<BaseEdgeProps>(), { interactionWidth: 20 })
77
88
const pathEl = ref<SVGPathElement | null>(null)
99
@@ -30,12 +30,11 @@ export default {
3030

3131
<template>
3232
<path
33+
v-bind="attrs"
3334
:id="id"
3435
ref="pathEl"
3536
:d="path"
36-
:style="props.style"
3737
class="vue-flow__edge-path"
38-
:class="attrs.class"
3938
:marker-end="markerEnd"
4039
:marker-start="markerStart"
4140
/>

packages/core/src/types/edge.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ export interface BaseEdgeProps extends EdgeLabelOptions {
201201
markerStart?: string
202202
markerEnd?: string
203203
interactionWidth?: number
204-
style?: CSSProperties
205204
}
206205

207206
export type BezierEdgeProps = EdgePositions &

0 commit comments

Comments
 (0)