Skip to content

Snap to Grid to use center of node instead of top left corner. #240

Answered by 240026763
240026763 asked this question in Q&A
Discussion options

You must be logged in to vote

Tada! If I change the library to use NodeModel instead of MovableModel in order to gain access to node size and use the size on pointer down and subtract the middle point when setting position, it snaps the nodes to the center instead:

I have a PR for you: #241

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@240026763
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by 240026763
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants