Text update

This commit is contained in:
Mat Groves 2013-05-23 22:57:59 +01:00
parent 2a6169a952
commit 34b6352a57

View file

@ -25,7 +25,7 @@ PIXI.Text = function(text, style)
this.setStyle(style); this.setStyle(style);
this.updateText(); this.updateText();
+ this.dirty = false; this.dirty = false;
}; };
// constructor // constructor
@ -73,7 +73,7 @@ PIXI.Text.prototype.updateText = function()
this.context.font = this.style.font; this.context.font = this.style.font;
//split text into lines //split text into lines
var lines = this.text.split("\n"); var lines = this.text.split(/(?:\r\n|\r|\n)/);
//calculate text width //calculate text width
var lineWidths = []; var lineWidths = [];