2
0

(editor) Improve edges responsiveness

Also fixed a ton of useEffects should make everything a bit more reactive.

Closes #307
This commit is contained in:
Baptiste Arnaud
2023-02-28 15:06:43 +01:00
parent caf4086dd8
commit f8f98adc1c
24 changed files with 438 additions and 429 deletions

View File

@ -31,14 +31,13 @@ export const GroupsCoordinatesProvider = ({
useEffect(() => {
setGroupsCoordinates(
groups.reduce(
(coords, block) => ({
(coords, group) => ({
...coords,
[block.id]: block.graphCoordinates,
[group.id]: group.graphCoordinates,
}),
{}
)
)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [groups])
const updateGroupCoordinates = useCallback(