Catch empty or duplacate fields, indices, names, relationships

This commit is contained in:
1ilit
2023-09-19 15:51:16 +03:00
parent 794ecdba08
commit 1016c3536e
4 changed files with 81 additions and 14 deletions

View File

@@ -13,9 +13,13 @@ export default function Relationship(props) {
r = Math.abs(y2 - y1) / 3;
if (r <= 2) {
if (x1 + tableWidth <= x2)
return `M ${x1 + tableWidth - 2 * offsetX} ${y1} L ${x2} ${y2}`;
return `M ${x1 + tableWidth - 2 * offsetX} ${y1} L ${x2 + 0.1} ${
y2 + 0.1
}`;
else if (x2 + tableWidth < x1)
return `M ${x2 + tableWidth - 2 * offsetX} ${y2} L ${x1} ${y1}`;
return `M ${x2 + tableWidth - 2 * offsetX} ${y2} L ${x1 + 0.1} ${
y1 + 0.1
}`;
}
}