Zone.setSize now has a resizeInput argument (re: #3124)

This commit is contained in:
Richard Davey 2018-01-05 16:18:10 +00:00
parent 7959656a58
commit 30e9699bb6

View file

@ -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;
},