Skip to content

Paper boundary with restrictTranslate doesn't work after <path> shape is rotated. #2731

Answered by kumilingus
HarryBuxton7 asked this question in Q&A
Discussion options

You must be logged in to vote

It works as intended. We take only the rotated model bounding box into account which is always a rectangle.

blue is the element bounding box and red is rotated element bounding box

The restrictTranslate() could be defined as a function returning a function, if you need to implement a custom logic.
Here's an example: https://www.jointjs.com/demos/hexagonal-grid

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by HarryBuxton7
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