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 <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2025-01-09 11:50:32 +01:00
parent 0a0d8af16c
commit 44b9232b19
3 changed files with 7 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
---
"@vue-flow/core": minor
---
Inherit attributes on main edge path element in BaseEdge component.

View File

@@ -3,7 +3,7 @@ import { ref, useAttrs } from 'vue'
import type { BaseEdgeProps } from '../../types'
import EdgeText from './EdgeText.vue'
const { interactionWidth = 20, labelShowBg = true, ...props } = defineProps<BaseEdgeProps>()
withDefaults(defineProps<BaseEdgeProps>(), { interactionWidth: 20 })
const pathEl = ref<SVGPathElement | null>(null)
@@ -30,12 +30,11 @@ export default {
<template>
<path
v-bind="attrs"
:id="id"
ref="pathEl"
:d="path"
:style="props.style"
class="vue-flow__edge-path"
:class="attrs.class"
:marker-end="markerEnd"
:marker-start="markerStart"
/>

View File

@@ -201,7 +201,6 @@ export interface BaseEdgeProps extends EdgeLabelOptions {
markerStart?: string
markerEnd?: string
interactionWidth?: number
style?: CSSProperties
}
export type BezierEdgeProps = EdgePositions &