Merge pull request #39 from medtaher123/fix/extra-rerendering

fix: remove extra rerendering when position changes
This commit is contained in:
Mohamed Marrouchi 2024-09-19 08:38:36 +01:00 committed by GitHub
commit d2555d9f94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -273,7 +273,13 @@ const Diagrams = () => {
zoomUpdated: debouncedZoomEvent,
offsetUpdated: debouncedOffsetEvent,
});
}, [JSON.stringify(blocks)]);
}, [
JSON.stringify(
blocks.map((b) => {
return { ...b, position: undefined, updatedAt: undefined };
}),
),
]);
const handleDeleteButton = () => {
const selectedEntities = engine?.getModel().getSelectedEntities();