When I add a text object to my canvas using fabricJs, the bounding box is automatically calculated based on the size of the text rendered. Is there a way to manually set the coordinates of the bounding box?
For example, I can place text using the following
var text = new fabric.Text('hello world', { left: 100, top: 100 });
canvas.add(text);
But the bounding box is calculated automatically. What if I wanted a very wide box with right-aligned text? I'd like to do something like this:
var text = new fabric.Text('hello world', { left: 100, top: 100, width: 500, textAlign: "right" });
canvas.add(text);
But the width appears to be ignored and the text appears aligned at the (100,100) position instead of to the right.