mirror of
https://github.com/photonstorm/phaser
synced 2025-01-03 00:38:46 +00:00
Merge pull request #6145 from rexrainbow/update-hitarea-when-settexture
Update hitarea when changing frame
This commit is contained in:
commit
3974f97994
1 changed files with 8 additions and 0 deletions
|
@ -125,6 +125,14 @@ var Size = {
|
||||||
this.width = frame.realWidth;
|
this.width = frame.realWidth;
|
||||||
this.height = frame.realHeight;
|
this.height = frame.realHeight;
|
||||||
|
|
||||||
|
var input = this.input;
|
||||||
|
|
||||||
|
if (input && !input.customHitArea)
|
||||||
|
{
|
||||||
|
input.hitArea.width = this.width;
|
||||||
|
input.hitArea.height = this.height;
|
||||||
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue