refactor(core): pass id to base edge
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user