fix(edges): add missing edge class to edge wrapper

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-14 19:04:13 +01:00
committed by Braks
parent cd778715a2
commit f0f7e7e49a
9 changed files with 48 additions and 43 deletions
+19 -18
View File
@@ -6,26 +6,28 @@ import type { BaseEdgeProps } from '~/types'
* The base edge is a simple wrapper for svg path
* You can use the base edge in your custom edges and just pass down the necessary props
*/
const BaseEdge: FunctionalComponent<BaseEdgeProps> = function ({
path,
label,
labelX,
labelY,
labelBgBorderRadius,
labelBgPadding,
labelBgStyle,
labelShowBg = true,
labelStyle,
markerStart,
markerEnd,
style,
interactionWidth = 20,
}) {
const BaseEdge: FunctionalComponent<BaseEdgeProps> = function (
{
path,
label,
labelX,
labelY,
labelBgBorderRadius,
labelBgPadding,
labelBgStyle,
labelShowBg = true,
labelStyle,
markerStart,
markerEnd,
interactionWidth = 20,
},
{ attrs },
) {
return [
h('path', {
'style': style,
'style': attrs.style,
'class': ['vue-flow__edge-path', attrs.class].join(' '),
'd': path,
'class': 'vue-flow__edge-path',
'marker-end': markerEnd,
'marker-start': markerStart,
}),
@@ -64,7 +66,6 @@ BaseEdge.props = [
'labelStyle',
'markerStart',
'markerEnd',
'style',
'interactionWidth',
]