diff --git a/src/pixi/text/BitmapText.js b/src/pixi/text/BitmapText.js index 27ef4e3..b28a662 100644 --- a/src/pixi/text/BitmapText.js +++ b/src/pixi/text/BitmapText.js @@ -23,9 +23,7 @@ this._pool = []; this.setText(text); - this.setStyle(style); - this.updateText(); - this.dirty = false; + this.setStyle(style); //this will call updateText for us }; // constructor @@ -41,7 +39,7 @@ PIXI.BitmapText.prototype.setText = function(text) { this.text = text || ' '; - this.dirty = true; + this.updateText(); }; /** @@ -61,9 +59,9 @@ var font = style.font.split(' '); this.fontName = font[font.length - 1]; this.fontSize = font.length >= 2 ? parseInt(font[font.length - 2], 10) : PIXI.BitmapText.fonts[this.fontName].size; - - this.dirty = true; this.tint = style.tint; + + this.updateText(); }; /** @@ -160,21 +158,4 @@ this.height = (pos.y + data.lineHeight) * scale; }; -/** - * Updates the transform of this object - * - * @method updateTransform - * @private - */ -PIXI.BitmapText.prototype.updateTransform = function() -{ - if(this.dirty) - { - this.updateText(); - this.dirty = false; - } - - PIXI.DisplayObjectContainer.prototype.updateTransform.call(this); -}; - PIXI.BitmapText.fonts = {};