Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align snapTo based on Grid dots if grid and snapTo is the same size #489

Open
mmailaender opened this issue Nov 16, 2023 · 2 comments
Open

Comments

@mmailaender
Copy link

The (default) gridWith is 22px big. If the snapTo is also set to 22px the alignment of the nodes should be based on the Grid dots.

Current behavior:
image

Expected behavior (Screenshot from React Flow):
image

@kkarpeev
Copy link

kkarpeev commented Dec 1, 2023

Hi! I've tried to force this behavior on v8 with a custom background component (with background-image: radial-gradient(), position & size), but didn't succeed for now. Just don't have time to finish it properly. Maybe I'll return to this later.
And, yeah, that is expected behavior out-of-box if we take React Flow as a prototype.

@mmailaender
Copy link
Author

Maybe an easy solution could be to align the background grid with x: 0 and y: 0?

Currently x: 0 and y: 0 is in the center of 4 dots.
image

And instead making one dot as the anchor for x: 0 and y: 0 like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants