Replies: 2 comments
-
For deselecting i would suspect 'discardActiveObject' is what you are looking for? For blocking events there isn't much that blocks interaction with a single command. https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events pointer events: none should do the trick. To get an hold of the upper canvas element you can use the |
Beta Was this translation helpful? Give feedback.
-
@asturur Thanks for the pointers. I did try a number of different methods that I found online but they all seemed to be deprecated in version 6. I will gove 'discardActiveObject' a go and also use the getter and the css you mentioned. Thats a good shout. I am new the FabricJS and look forwards to learning more once the version 6 documentation is released. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am creating a T-Shirt Design tool using version 6. As part of the functionality I have created a preview function that crops any image or text that sits outside the print area and displays a rendering of the finished article. One thing I have noticed is that if I have an object still selected and I run the preview method then the selected object is still shown.
My question is is there a way of clearing the activeObject/s within version 6. Also is there a way to stop the entire canvas from being clicked? I can add a layer over the canvas to prevent any click but I would prefer a programatic solution involving the canvas.
Beta Was this translation helpful? Give feedback.
All reactions