springy alg

This commit is contained in:
Jan Prochazka
2022-01-06 11:26:30 +01:00
parent e2376f553a
commit 3a810e5bb5
2 changed files with 39 additions and 9 deletions

View File

@@ -461,12 +461,12 @@
...current,
tables: (current?.tables || []).map(table => {
const position = positions.find(x => x.nodeData?.designerId == table.designerId);
console.log('POSITION', position);
// console.log('POSITION', position);
return position
? {
...table,
left: position.x,
top: position.y,
left: position.x - position.nodeWidth / 2,
top: position.y - position.nodeHeight / 2,
}
: table;
}),