mirror of
https://github.com/photonstorm/phaser
synced 2024-11-14 00:47:29 +00:00
Text with lineSpacing set wouldn't apply the lineSpacing to the final line of text in the Text string, or to text with just single lines. This could lead to incorrect height calculations for further layout and unwanted padding at the bottom of Text objects (thanks @Lopdo #2137)
This commit is contained in:
parent
15411f1e56
commit
0c52b9316a
2 changed files with 2 additions and 2 deletions
|
@ -379,6 +379,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
|
|||
* If the Mouse was over a Sprite and you then clicked it, it would dispatch another Over event. This is now surpressed if the Over event has already been dispatched previously (thanks @McFarts #2133)
|
||||
* InputHandler.pointerOver could fail to return anything in some instances, now always returns a boolean.
|
||||
* Tween.onLoop would be fired when a Tween repeated and Tween.onRepeat would be fired when a Tween looped. These are now reversed to fire correctly (thanks @vladkens #2024)
|
||||
* Text with lineSpacing set wouldn't apply the lineSpacing to the final line of text in the Text string, or to text with just single lines. This could lead to incorrect height calculations for further layout and unwanted padding at the bottom of Text objects (thanks @Lopdo #2137)
|
||||
|
||||
### Pixi Updates
|
||||
|
||||
|
|
|
@ -439,8 +439,7 @@ Phaser.Text.prototype.updateText = function () {
|
|||
// Adjust for line spacing
|
||||
if (lineSpacing !== 0)
|
||||
{
|
||||
var diff = lineSpacing * (lines.length - 1);
|
||||
height += diff;
|
||||
height += lineSpacing * lines.length;
|
||||
}
|
||||
|
||||
this.canvas.height = height * this._res;
|
||||
|
|
Loading…
Reference in a new issue