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 (
|
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',
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user