fix placement

This commit is contained in:
wass08
2026-02-02 11:39:38 +09:00
parent 5392d66bd6
commit 73dfac795a
2 changed files with 12 additions and 4 deletions
@@ -97,9 +97,15 @@ export const updateNodesAction = (
return { nodes: nextNodes }
})
// Mark dirty
updates.forEach((u) => get().markDirty(u.id))
parentsToUpdate.forEach((pId) => get().markDirty(pId))
// Mark dirty after the next frame to ensure React renders complete
requestAnimationFrame(() => {
updates.forEach((u) => {
get().markDirty(u.id)
})
parentsToUpdate.forEach((pId) => {
get().markDirty(pId)
})
})
}
export const deleteNodesAction = (