Merge pull request #481 from ekelokorpi/dev

CocoonJS fix on updateText
This commit is contained in:
Mat Groves 2014-01-09 04:03:18 -08:00
commit c601e020b7

View file

@ -109,6 +109,8 @@ PIXI.Text.prototype.updateText = function()
var lineHeight = this.determineFontHeight('font: ' + this.style.font + ';') + this.style.strokeThickness; var lineHeight = this.determineFontHeight('font: ' + this.style.font + ';') + this.style.strokeThickness;
this.canvas.height = lineHeight * lines.length; this.canvas.height = lineHeight * lines.length;
if(navigator.isCocoonJS) this.context.clearRect(0,0,this.canvas.width,this.canvas.height);
//set canvas text styles //set canvas text styles
this.context.fillStyle = this.style.fill; this.context.fillStyle = this.style.fill;
this.context.font = this.style.font; this.context.font = this.style.font;