mirror of
https://github.com/wassname/phaser.git
synced 2026-06-27 16:10:15 +08:00
Fix box dimensions in PIXI.BitmapText. Support anchor in Phaser.BitmapText
This commit is contained in:
@@ -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', {
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user