Skip to content

Commit b4ba795

Browse files
committed
Added missing copy parameter to Image.crop, fixing jshint in the process.
1 parent cca955f commit b4ba795

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/gameobjects/Image.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,10 @@ Phaser.Image.prototype.resetFrame = function() {
369369
*
370370
* @method Phaser.Image#crop
371371
* @memberof Phaser.Image
372-
* @param {Phaser.Rectangle|object} rect - The Rectangle to crop the Image to. Pass null or no parameters to clear a previously set crop rectangle.
372+
* @param {Phaser.Rectangle} rect - The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle.
373+
* @param {boolean} [copy=false] - If false Sprite.cropRect will be a reference to the given rect. If true it will copy the rect values into a local Sprite.cropRect object.
373374
*/
374-
Phaser.Image.prototype.crop = function(rect) {
375+
Phaser.Image.prototype.crop = function(rect, copy) {
375376

376377
if (typeof copy === 'undefined') { copy = false; }
377378

0 commit comments

Comments
 (0)