update link positions on table move

This commit is contained in:
1ilit
2023-09-19 15:47:48 +03:00
parent 09f7142d75
commit 58642f3e8e
3 changed files with 33 additions and 6 deletions

View File

@@ -226,12 +226,15 @@ export default function Table(props) {
className={`w-[10px] h-[10px] bg-green-600 rounded-full me-2`}
onMouseDown={(ev) => {
props.handleGripField(i);
props.setLine({
props.setLine((prev)=>({
...prev,
startFieldId: i,
startTableId: props.id,
startX: props.tableData.x + 15,
startY: props.tableData.y + i * 36 + 40 + 19,
endX: props.tableData.x + 15,
endY: props.tableData.y + i * 36 + 40 + 19,
});
}));
}}
></button>
{e.name}