mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Zone.setSize now has a resizeInput
argument (re: #3124)
This commit is contained in:
parent
7959656a58
commit
30e9699bb6
1 changed files with 9 additions and 1 deletions
|
@ -74,11 +74,19 @@ var Zone = new Class({
|
|||
|
||||
},
|
||||
|
||||
setSize: function (width, height)
|
||||
setSize: function (width, height, resizeInput)
|
||||
{
|
||||
if (resizeInput === undefined) { resizeInput = true; }
|
||||
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
|
||||
if (resizeInput && this.input && this.input.hitArea instanceof Rectangle)
|
||||
{
|
||||
this.input.hitArea.width = width;
|
||||
this.input.hitArea.height = height;
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue