Skip to content

Commit e86f00e

Browse files
committed
Text.lineSpacing works correctly again. Before no space was added between the lines (thanks @intimidate phaserjs#1367 and @brejep phaserjs#1366)
1 parent bc588ef commit e86f00e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ This fixes a bug in FF where it would use the default DOMMouseWheel (thanks @pns
249249
* Emitter.setScale fixed minX minY order presedence (thanks spayton)
250250
* Group.iterate can now accept undefined/null as the arguments (thanks @pnstickne #1353 @tasos-ch #1352)
251251
* When you change State the P2 Physics world is no longer fully cleared. All of the bodies, springs, fixtures, materials and constraints are removed - but config settings such as gravity, restitution, the contact solver, etc are all retained. The P2.World object is only created the very first time you call Physics.startSystem. Every subsequent call hits P2.World.reset instead. This fixes "P2.World gravity broken after switching states" (and other related issues) (#1292 #1289 #1176)
252+
* Text.lineSpacing works correctly again. Before no space was added between the lines (thanks @intimidate #1367 and @brejep #1366)
252253

253254
### Pixi 2.1.0 New Features
254255

src/gameobjects/Text.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ Phaser.Text.prototype.updateText = function () {
386386

387387
//calculate text height
388388
var lineHeight = fontProperties.fontSize + this.style.strokeThickness + this._lineSpacing;
389-
390-
var height = lineHeight * lines.length;
389+
390+
var height = (lineHeight + this._lineSpacing) * lines.length;
391391

392392
this.canvas.height = height * this.resolution;
393393

0 commit comments

Comments
 (0)