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:
5
.changeset/stale-radios-listen.md
Normal file
5
.changeset/stale-radios-listen.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@vue-flow/core": minor
|
||||
---
|
||||
|
||||
Inherit attributes on main edge path element in BaseEdge component.
|
||||
@@ -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"
|
||||
/>
|
||||
|
||||
@@ -201,7 +201,6 @@ export interface BaseEdgeProps extends EdgeLabelOptions {
|
||||
markerStart?: string
|
||||
markerEnd?: string
|
||||
interactionWidth?: number
|
||||
style?: CSSProperties
|
||||
}
|
||||
|
||||
export type BezierEdgeProps = EdgePositions &
|
||||
|
||||
Reference in New Issue
Block a user