Fix box dimensions in PIXI.BitmapText. Support anchor in Phaser.BitmapText

This commit is contained in:
TheJare
2013-09-21 01:03:19 +01:00
parent 8452fa0fd4
commit e4595d2a41
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -80,6 +80,9 @@ Phaser.BitmapText.prototype.update = function() {
this._cache.dirty = true;
}
this.pivot.x = this.anchor.x*this.width;
this.pivot.y = this.anchor.y*this.height;
}
Object.defineProperty(Phaser.BitmapText.prototype, 'angle', {
+1 -1
View File
@@ -135,7 +135,7 @@ PIXI.BitmapText.prototype.updateText = function()
this.addChild(c);
}
this.width = pos.x * scale;
this.width = maxLineWidth * scale;
this.height = (pos.y + data.lineHeight) * scale;
};