mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
reverted using getTextBounds for cotainer getBounds()
This commit is contained in:
parent
729cb22958
commit
bc6ec0a124
1 changed files with 10 additions and 19 deletions
|
@ -407,28 +407,19 @@ var Container = new Class({
|
||||||
{
|
{
|
||||||
var entry = children[i];
|
var entry = children[i];
|
||||||
|
|
||||||
if (entry.getTextBounds)
|
if (entry.getBounds)
|
||||||
{
|
|
||||||
var textBounds = entry.getTextBounds().global;
|
|
||||||
tempRect.setTo(textBounds.x, textBounds.y, textBounds.width, textBounds.height);
|
|
||||||
}
|
|
||||||
else if (entry.getBounds)
|
|
||||||
{
|
{
|
||||||
entry.getBounds(tempRect);
|
entry.getBounds(tempRect);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!hasSetFirst)
|
if (!hasSetFirst)
|
||||||
{
|
{
|
||||||
output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);
|
output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);
|
||||||
hasSetFirst = true;
|
hasSetFirst = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Union(tempRect, output, output);
|
Union(tempRect, output, output);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue