Fabric js can objects delimitate the selection box?

I am creating a drawing program with fabric js and I have noticed that the selection area is related to the start and end of the biggest line point , meaning if I make a horizontal or vertical line I will get a small selection box , if I do a diagonal line the selection box will be a square.
My question is , is there a way to calculate a bounding box of these object to change the selection box like those you see on drawing svg layer software like krita or a selection tool like the laso tool from photoshop. Something that does not show such huge selection box on diagonal or figure drawings