Skip to content

Free, simple, and intuitive online database diagram editor and SQL generator.

Fix inverted relationship labels on a straight line

1ilit08ec175800f5
diff --git a/src/utils/index.js b/src/utils/index.js
index 243cfb6b..5b656175 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -599,7 +599,7 @@ const calcPath = (x1, x2, y1, y2, startFieldId, endFieldId, zoom = 1) => {
if (x1 + tableWidth <= x2)
return `M ${x1 + tableWidth - 2 * offsetX} ${y1} L ${x2} ${y2 + 0.1}`;
else if (x2 + tableWidth < x1)
- return `M ${x2 + tableWidth - 2 * offsetX} ${y2} L ${x1} ${y1 + 0.1}`;
+ return `M ${x1} ${y1} L ${x2 + tableWidth - 2 * offsetX} ${y2 + 0.1}`;
}
}