mirror of
https://github.com/photonstorm/phaser
synced 2024-09-21 06:51:55 +00:00
Set customHitArea to false if shape is not defined
In setHitArea method, use setHitAreaFromTexture if shape is undefined. Suppose that it is not a case of `customHitArea`
This commit is contained in:
parent
96f96a7258
commit
16a038674f
1 changed files with 3 additions and 1 deletions
|
@ -2101,6 +2101,7 @@ var InputPlugin = new Class({
|
|||
var cursor = false;
|
||||
var useHandCursor = false;
|
||||
var pixelPerfect = false;
|
||||
var customHitArea = true;
|
||||
|
||||
// Config object?
|
||||
if (IsPlainObject(shape))
|
||||
|
@ -2127,6 +2128,7 @@ var InputPlugin = new Class({
|
|||
if (!shape || !callback)
|
||||
{
|
||||
this.setHitAreaFromTexture(gameObjects);
|
||||
customHitArea = false;
|
||||
}
|
||||
}
|
||||
else if (typeof shape === 'function' && !callback)
|
||||
|
@ -2147,7 +2149,7 @@ var InputPlugin = new Class({
|
|||
|
||||
var io = (!gameObject.input) ? CreateInteractiveObject(gameObject, shape, callback) : gameObject.input;
|
||||
|
||||
io.customHitArea = true;
|
||||
io.customHitArea = customHitArea;
|
||||
io.dropZone = dropZone;
|
||||
io.cursor = (useHandCursor) ? 'pointer' : cursor;
|
||||
|
||||
|
|
Loading…
Reference in a new issue