Swap primary and foreign tables

This commit is contained in:
1ilit
2023-09-19 15:50:47 +03:00
parent 2b2e4840c9
commit 155690e0f7
2 changed files with 44 additions and 1 deletions

View File

@@ -347,10 +347,14 @@ export default function Editor(props) {
...r,
startX: updatedValues.x + 15,
startY: updatedValues.y + r.startFieldId * 36 + 69,
endX: tables[r.endTableId].x + 15,
endY: tables[r.endTableId].y + r.endFieldId * 36 + 69,
};
} else if (r.endTableId === id) {
return {
...r,
startX: tables[r.startTableId].x + 15,
startY: tables[r.startTableId].y + r.startFieldId * 36 + 69,
endX: updatedValues.x + 15,
endY: updatedValues.y + r.endFieldId * 36 + 69,
};