mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Fixed Rectangle hit area coordinates
This commit is contained in:
parent
5b5014744a
commit
7f835da1e1
1 changed files with 2 additions and 6 deletions
|
@ -226,10 +226,7 @@ var Zone = new Class({
|
|||
*/
|
||||
setRectangleDropZone: function (width, height)
|
||||
{
|
||||
var x = -(width / 2);
|
||||
var y = -(height / 2);
|
||||
|
||||
return this.setDropZone(new Rectangle(x, y, width, height), RectangleContains);
|
||||
return this.setDropZone(new Rectangle(0, 0, width, height), RectangleContains);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -249,8 +246,7 @@ var Zone = new Class({
|
|||
{
|
||||
this.setRectangleDropZone(this.width, this.height);
|
||||
}
|
||||
else
|
||||
if (!this.input)
|
||||
else if (!this.input)
|
||||
{
|
||||
this.setInteractive(shape, callback, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue