Skip to content

Commit 4693bfb

Browse files
authored
Merge pull request phaserjs#4524 from rexrainbow/master
Use `customHitArea` in condition
2 parents 48a9925 + fd454a1 commit 4693bfb

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/gameobjects/zone/Zone.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,12 @@ var Zone = new Class({
165165
this.width = width;
166166
this.height = height;
167167

168-
if (resizeInput && this.input && this.input.hitArea instanceof Rectangle)
168+
var input = this.input;
169+
170+
if (resizeInput && input && !input.customHitArea)
169171
{
170-
this.input.hitArea.width = width;
171-
this.input.hitArea.height = height;
172+
input.hitArea.width = width;
173+
input.hitArea.height = height;
172174
}
173175

174176
return this;

0 commit comments

Comments
 (0)