CocoonJS fix on updateText

This commit is contained in:
Eemeli Kelokorpi 2014-01-09 13:58:47 +02:00
parent 9bba647dd4
commit 5ca0f92818

View file

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