refactor(core): pass id to base edge

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-05-11 15:33:42 +02:00
committed by Braks
parent 74939d0325
commit fb09d08e9b
2 changed files with 4 additions and 0 deletions
@@ -9,6 +9,7 @@ import type { BaseEdgeProps } from '~/types'
*/ */
const BaseEdge: FunctionalComponent<BaseEdgeProps> = function ( const BaseEdge: FunctionalComponent<BaseEdgeProps> = function (
{ {
id,
path, path,
label, label,
labelX, labelX,
@@ -26,6 +27,7 @@ const BaseEdge: FunctionalComponent<BaseEdgeProps> = function (
) { ) {
return [ return [
h('path', { h('path', {
'id': id,
'style': attrs.style, 'style': attrs.style,
'class': ['vue-flow__edge-path', attrs.class].join(' '), 'class': ['vue-flow__edge-path', attrs.class].join(' '),
'd': path, 'd': path,
@@ -56,6 +58,7 @@ const BaseEdge: FunctionalComponent<BaseEdgeProps> = function (
} }
BaseEdge.props = [ BaseEdge.props = [
'id',
'path', 'path',
'labelX', 'labelX',
'labelY', 'labelY',
+1
View File
@@ -192,6 +192,7 @@ export interface EdgeProps<Data = ElementData, CustomEvents = {}, Type extends s
} }
export interface BaseEdgeProps extends EdgeLabelOptions { export interface BaseEdgeProps extends EdgeLabelOptions {
id?: string
labelX?: number labelX?: number
labelY?: number labelY?: number
path: string path: string