EffEPi / fabric.curvedText

Allows you to create curved text - extension to fabric.js
43 stars 41 forks source link

Bounding Box if off #11

Closed anhle82 closed 10 years ago

anhle82 commented 10 years ago

Hi EffEPi,

Nice plugin. Thanks for devoting your time to make curve text available. I have a question though, is there anyway to make the curve text fit nicely inside its bounding border/control box? Right now the text is at a lower right corner and if radius or spacing is increase or reverse is set then the text is at one place and the control box is at another place, very hard to resize/rotate...I've been looking at the code and couldn't figure out why, is that because function _calcBounds() return incorrect value?

anhle82 commented 10 years ago

After playing around with it, i found a quick fix by adding the following lines in _render

this.letters.left = -(this.letters.width / 2); this.letters.top = - (this.letters.height / 2);

EffEPi commented 10 years ago

Thank you, I am going to look into it right away