mirror of
https://github.com/photonstorm/phaser
synced 2024-11-17 10:18:42 +00:00
Swapped hit area size detection priority
This commit is contained in:
parent
38b11b8947
commit
837cc4e86d
1 changed files with 7 additions and 7 deletions
|
@ -1704,20 +1704,20 @@ var InputPlugin = new Class({
|
|||
var width = 0;
|
||||
var height = 0;
|
||||
|
||||
if (frame)
|
||||
{
|
||||
width = frame.realWidth;
|
||||
height = frame.realHeight;
|
||||
}
|
||||
else if (gameObject.width)
|
||||
if (gameObject.width)
|
||||
{
|
||||
width = gameObject.width;
|
||||
height = gameObject.height;
|
||||
}
|
||||
else if (frame)
|
||||
{
|
||||
width = frame.realWidth;
|
||||
height = frame.realHeight;
|
||||
}
|
||||
|
||||
if (gameObject.type === 'Container' && (width === 0 || height === 0))
|
||||
{
|
||||
console.warn('Container.setInteractive() must specify a Shape or call setSize() first');
|
||||
console.warn('Container.setInteractive must specify a Shape or call setSize() first');
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue