Wizcorp / Ejecta-X

A Fast, Open Source JavaScript, Canvas & Audio Implementation
http://wizcorp.github.io/Ejecta-X
185 stars 51 forks source link

fix fillText and cache width #85

Closed come closed 10 years ago

come commented 10 years ago

Note: the bug was hidden

To reproduce :

ctx.fillText("mylongtext1", 10 , 0); 
ctx.fillText("short1", 10 , 50);
ctx.fillText("mylongtext1", 10 , 100); 
//the second filltext "mylongtext1" take the size of the "short1" (so it is cropped !)

this commit solve this issue ;)