简体   繁体   中英

Fabric JS bounding box to "hug" / surround selected object

Hi is it possible to create a Fabric JS bounding box that doesn't display a rectangle around the selected object, but rather displays a line that "hugs" the selected object. For example a circle object gets a circular bounding box around it when selected, and other more complex shapes as well. I have read through the documentation and don't have any code to display since I am not sure how to start tackling this problem.

As far as I'm aware, the bounding box of an object will always be a Rectangle, and you cannot change it to another shape.

What you can do is play a bit with that bounding box, like in the fabricJS demo here , but you won't be able to get a circular box.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM