kangax/fabric.js — Issue #76: Selection rectangle is not correct for some fabric.Text objects
Author: mindjuice
Created: 2011-11-10 01:32:19+00:00
State: open

When you add a fabric.Text object and select it, the selection rectangle may not correctly contain all the text.

Paste the following code into the Kitchen Sink demo to see an example of the word "Hi".

canvas.clear();
canvas.remove(canvas.getActiveObject());

var text = new fabric.Text("Hi", {
left: 200,
top: 200,
fontFamily:"Delicious_500",
fill: '#FF0000'
});

text.scaleX = 2.0;
text.scaleY = 2.0;

canvas.add(text);

canvas.setActiveObject(text);