refactor(edge-label): prevent junpming

This commit is contained in:
moklick
2022-09-27 16:09:32 +02:00
parent 90418e36fa
commit 7542275ccc
2 changed files with 2 additions and 1 deletions

View File

@@ -107,7 +107,7 @@ const edges: Edge[] = [
const defaultEdgeOptions = {
label: 'Edge Label',
type: 'default',
type: 'smoothstep',
markerEnd: {
type: MarkerType.ArrowClosed,
},

View File

@@ -41,6 +41,7 @@ const EdgeText: FC<PropsWithChildren<EdgeTextProps>> = ({
<g
transform={`translate(${x - edgeTextBbox.width / 2} ${y - edgeTextBbox.height / 2})`}
className={edgeTextClasses}
visibility={edgeTextBbox.width ? 'visible' : 'hidden'}
{...rest}
>
{labelShowBg && (