diff --git a/example/src/Edges/index.js b/example/src/Edges/index.js index f17570f4..cd9e5d01 100644 --- a/example/src/Edges/index.js +++ b/example/src/Edges/index.js @@ -19,7 +19,7 @@ const initialElements = [ { id: '6', type: 'output', data: { label: 'Output 6' }, position: { x: 50, y: 550 } }, { id: '7', type: 'output', data: { label: 'Output 7' }, position: { x: 250, y: 550 } }, { id: '8', type: 'output', data: { label: 'Output 8' }, position: { x: 525, y: 600 } }, - { id: 'e1-2', source: '1', target: '2', label: 'bezier edge (default)' }, + { id: 'e1-2', source: '1', target: '2', label: 'bezier edge (default)', className: 'normal-edge' }, { id: 'e2-2a', source: '2', target: '2a', type: 'smoothstep', label: 'smoothstep edge' }, { id: 'e2-3', source: '2', target: '3', type: 'step', label: 'step edge' }, { id: 'e3-4', source: '3', target: '4', type: 'straight', label: 'straight edge' }, diff --git a/src/components/Edges/EdgeText.tsx b/src/components/Edges/EdgeText.tsx index a22a2bd6..44ac3285 100644 --- a/src/components/Edges/EdgeText.tsx +++ b/src/components/Edges/EdgeText.tsx @@ -12,8 +12,6 @@ export default memo(({ x, y, label, labelStyle = {}, labelShowBg = true, labelBg if (edgeRef.current) { const textBbox = edgeRef.current.getBBox(); - console.log(textBbox); - setEdgeTextBbox({ x: textBbox.x, y: textBbox.y, diff --git a/src/container/EdgeRenderer/index.tsx b/src/container/EdgeRenderer/index.tsx index ab57b2d8..90fa9b25 100644 --- a/src/container/EdgeRenderer/index.tsx +++ b/src/container/EdgeRenderer/index.tsx @@ -161,6 +161,7 @@ function renderEdge(