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
@@ -137,6 +137,9 @@ const EdgeWrapper = defineComponent({
targetPosition,
)
const edgeClass = edge.class instanceof Function ? edge.class(edge) : edge.class
const edgeStyle = edge.style instanceof Function ? edge.style(edge) : edge.style
return h(
'g',
{
@@ -145,6 +148,7 @@ const EdgeWrapper = defineComponent({
'class': [
'vue-flow__edge',
`vue-flow__edge-${props.type === false ? 'default' : props.name}`,
edgeClass,
{
updating: mouseOver,
selected: edge.selected,
@@ -180,7 +184,7 @@ const EdgeWrapper = defineComponent({
labelBgBorderRadius: edge.labelBgBorderRadius,
data: edge.data,
events: { ...edge.events, ...hooks.on },
style: edge.style instanceof Function ? edge.style(edge) : edge.style,
style: edgeStyle,
markerStart: `url(#${getMarkerId(edge.markerStart)})`,
markerEnd: `url(#${getMarkerId(edge.markerEnd)})`,
sourcePosition,