BitmapText.font wouldn't update an internal Pixi property (fontName) causing the text to fail to change font (thanks @starnut #1602)

This commit is contained in:
photonstorm 2015-02-08 22:07:36 +00:00
parent 46e5cfc639
commit e85be1f1d8
2 changed files with 2 additions and 0 deletions

View file

@ -101,6 +101,7 @@ Version 2.3.0 - "Tarabon" - in dev
* TileSprites were not detecting Pointer up events correctly because of a branching condition (thanks @integricho #1580 #1551)
* TileSprites weren't destroying WebGL textures, leading to eventual out of memory errors (thanks @chacal #1563)
* P2.Body.clearCollision default values were incorrectly set to `false` if no parameters were provided, even though the docs said they were `true` (thanks @brianbunch #1597)
* BitmapText.font wouldn't update an internal Pixi property (fontName) causing the text to fail to change font (thanks @starnut #1602)
For changes in previous releases please see the extensive [Version History](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md).

View file

@ -340,6 +340,7 @@ Object.defineProperty(Phaser.BitmapText.prototype, 'font', {
if (value !== this._font)
{
this._font = value.trim();
this.fontName = this._font;
this.style.font = this._fontSize + "px '" + this._font + "'";
this.dirty = true;
}