File tree Expand file tree Collapse file tree
src/gameobjects/bitmaptext Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919* A Scene can now be restarted by calling ` scene.start() ` and providing no arguments (thanks @migiyubi )
2020* The class GameObject has now been exposed, available via ` Phaser.GameObjects.GameObject ` (thanks @rexrainbow )
2121* A Camera following a Game Object will now take the zoom factor of the camera into consideration when scrolling. Fix #3353 (thanks @brandonvdongen )
22+ * Calling ` setText ` on a BitmapText object will now recalculate its display origin values. Fix #3350 (thanks @migiyubi )
2223
2324## Version 3.2.0 - Kaori - 5th March 2018
2425
Original file line number Diff line number Diff line change @@ -245,6 +245,8 @@ var DynamicBitmapText = new Class({
245245 if ( value !== this . text )
246246 {
247247 this . text = value . toString ( ) ;
248+
249+ this . updateDisplayOrigin ( ) ;
248250 }
249251
250252 return this ;
Original file line number Diff line number Diff line change @@ -164,6 +164,8 @@ var BitmapText = new Class({
164164 if ( value !== this . text )
165165 {
166166 this . text = value . toString ( ) ;
167+
168+ this . updateDisplayOrigin ( ) ;
167169 }
168170
169171 return this ;
@@ -216,6 +218,7 @@ var BitmapText = new Class({
216218 get : function ( )
217219 {
218220 this . getTextBounds ( false ) ;
221+
219222 return this . _bounds . global . width ;
220223 }
221224
@@ -233,6 +236,7 @@ var BitmapText = new Class({
233236 get : function ( )
234237 {
235238 this . getTextBounds ( false ) ;
239+
236240 return this . _bounds . global . height ;
237241 }
238242
You can’t perform that action at this time.
0 commit comments