constrain object, prevent scaling, moving and turning out of canvas #6893
Gerwin-prog
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
You can start to open a jsfiddle with that code and fabricJS 4.3.1 and we can see what has broken . |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
I am wondering if there's a "constrain to canvas" option for objects, for example for text - if there isn't this could be an amazing feature to have, as there seems to be a lot of demand for it - with loads of different answers, but none seem to work on the newest build.
I've found this SO answer:
Constrain element to canvas
Which works really well with FabricJS version 1.7.3, but it doesn't seem to work on the version I've build myself, from downloading the source from GitHub & compiling it using Node. The odd thing is that it works fine on the right side & bottom side, but the top (0) and left (0) don't seem to work with the latest build.
I wonder if something changed in the handling of scaling between the newest version & version 1.7.3, of if there are any alternatives.
Beta Was this translation helpful? Give feedback.
All reactions