Skip to content

Commit 2483cd5

Browse files
committed
Various readonly Body properties flagged as 'readonly' in the jsdocs (phaserjs#1643)
1 parent 53b1562 commit 2483cd5

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ We've also removed functions and properties from Pixi classes that Phaser doesn'
202202
* A TweenData wouldn't take into account the `repeatDelay` property when repeating the tween, but now does. A TweenData also has a new property `yoyoDelay` which controls the delay before the yoyo will start, allowing you to set both independently (thanks @DreadKnight #1469)
203203
* Animation.update skips ahead frames when the system is lagging, however it failed to set the animation to the final frame in the sequence if the animation skipped ahead too far (thanks @richpixel #1628)
204204
* Loader.preloadSprite had an extra guard added to ensure it didn't try to updateCrop a non-existent sprite (thanks @noidexe #1636)
205+
* The `TilemapParser` has had its row / column calculations updated to account for margins and and spacing on all sides of the tileset (thanks @zekoff #1642)
205206

206207
### Pixi 2.2.7 Bug Fixes
207208

src/physics/arcade/Body.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,31 @@ Phaser.Physics.Arcade.Body = function (sprite) {
8383

8484
/**
8585
* @property {number} width - The calculated width of the physics body.
86+
* @readonly
8687
*/
8788
this.width = sprite.width;
8889

8990
/**
9091
* @property {number} height - The calculated height of the physics body.
92+
* @readonly
9193
*/
9294
this.height = sprite.height;
9395

9496
/**
9597
* @property {number} halfWidth - The calculated width / 2 of the physics body.
98+
* @readonly
9699
*/
97100
this.halfWidth = Math.abs(sprite.width / 2);
98101

99102
/**
100103
* @property {number} halfHeight - The calculated height / 2 of the physics body.
104+
* @readonly
101105
*/
102106
this.halfHeight = Math.abs(sprite.height / 2);
103107

104108
/**
105109
* @property {Phaser.Point} center - The center coordinate of the Physics Body.
110+
* @readonly
106111
*/
107112
this.center = new Phaser.Point(sprite.x + this.halfWidth, sprite.y + this.halfHeight);
108113

0 commit comments

Comments
 (0)