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-10 13:13:10 +02:00
committed by Braks
parent 74939d0325
commit fb09d08e9b
2 changed files with 4 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import type { BaseEdgeProps } from '~/types'
*/
const BaseEdge: FunctionalComponent<BaseEdgeProps> = function (
{
id,
path,
label,
labelX,
@@ -26,6 +27,7 @@ const BaseEdge: FunctionalComponent<BaseEdgeProps> = function (
) {
return [
h('path', {
'id': id,
'style': attrs.style,
'class': ['vue-flow__edge-path', attrs.class].join(' '),
'd': path,
@@ -56,6 +58,7 @@ const BaseEdge: FunctionalComponent<BaseEdgeProps> = function (
}
BaseEdge.props = [
'id',
'path',
'labelX',
'labelY',

View File

@@ -192,6 +192,7 @@ export interface EdgeProps<Data = ElementData, CustomEvents = {}, Type extends s
}
export interface BaseEdgeProps extends EdgeLabelOptions {
id?: string
labelX?: number
labelY?: number
path: string