Remove magic numbers in table height calculations

This commit is contained in:
1ilit
2024-04-12 04:24:19 +03:00
parent 93b924aec7
commit 9faf99d9d7
4 changed files with 51 additions and 11 deletions

View File

@@ -4,6 +4,7 @@ import {
ObjectType,
tableFieldHeight,
tableHeaderHeight,
tableColorStripHeight,
} from "../../data/constants";
import {
IconEdit,
@@ -289,9 +290,19 @@ export default function Table(props) {
startFieldId: index,
startTableId: tableData.id,
startX: tableData.x + 15,
startY: tableData.y + index * 36 + 50 + 19,
startY:
tableData.y +
index * tableFieldHeight +
tableHeaderHeight +
tableColorStripHeight +
12,
endX: tableData.x + 15,
endY: tableData.y + index * 36 + 50 + 19,
endY:
tableData.y +
index * tableFieldHeight +
tableHeaderHeight +
tableColorStripHeight +
12,
}));
}}
/>