feat(editor): snap dragged nodes to the 20px grid

Match Vue Flow's snap grid to the background gap so nodes line up
on the dots they already render against.
This commit is contained in:
Julien Calixte
2026-06-20 11:19:37 +02:00
parent 27b7a8da5e
commit d7d0966adc

View File

@@ -385,6 +385,8 @@ onBeforeUnmount(() => {
:connection-radius="30" :connection-radius="30"
:min-zoom="0.2" :min-zoom="0.2"
:max-zoom="4" :max-zoom="4"
:snap-to-grid="true"
:snap-grid="[20, 20]"
class="size-full" class="size-full"
> >
<Background :gap="20" pattern-color="#d1d5db" /> <Background :gap="20" pattern-color="#d1d5db" />