Skip to content

Commit fb7f668

Browse files
committed
Marked width/height as readonly and added docs. Fix phaserjs#4806
1 parent 178a492 commit fb7f668

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/physics/arcade/Body.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ var Body = new Class({
190190
this.rotation = gameObject.angle;
191191

192192
/**
193-
* The Body's rotation, in degrees, during the previous step.
193+
* The Body rotation, in degrees, during the previous step.
194194
*
195195
* @name Phaser.Physics.Arcade.Body#preRotation
196196
* @type {number}
@@ -199,22 +199,26 @@ var Body = new Class({
199199
this.preRotation = gameObject.angle;
200200

201201
/**
202-
* The width of the Body's boundary, in pixels.
203-
* If the Body is circular, this is also the Body's diameter.
202+
* The width of the Body boundary, in pixels.
203+
* If the Body is circular, this is also the diameter.
204+
* If you wish to change the width use the `Body.setSize` method.
204205
*
205206
* @name Phaser.Physics.Arcade.Body#width
206207
* @type {number}
208+
* @readonly
207209
* @default 64
208210
* @since 3.0.0
209211
*/
210212
this.width = width;
211213

212214
/**
213-
* The height of the Body's boundary, in pixels.
214-
* If the Body is circular, this is also the Body's diameter.
215+
* The height of the Body boundary, in pixels.
216+
* If the Body is circular, this is also the diameter.
217+
* If you wish to change the height use the `Body.setSize` method.
215218
*
216219
* @name Phaser.Physics.Arcade.Body#height
217220
* @type {number}
221+
* @readonly
218222
* @default 64
219223
* @since 3.0.0
220224
*/

0 commit comments

Comments
 (0)