reverted using getTextBounds for cotainer getBounds()

This commit is contained in:
Emil Schnedler Vad 2023-04-08 20:37:12 +02:00
parent 729cb22958
commit bc6ec0a124

View file

@ -407,28 +407,19 @@ var Container = new Class({
{
var entry = children[i];
if (entry.getTextBounds)
{
var textBounds = entry.getTextBounds().global;
tempRect.setTo(textBounds.x, textBounds.y, textBounds.width, textBounds.height);
}
else if (entry.getBounds)
if (entry.getBounds)
{
entry.getBounds(tempRect);
}
else
{
continue;
}
if (!hasSetFirst)
{
output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);
hasSetFirst = true;
}
else
{
Union(tempRect, output, output);
if (!hasSetFirst)
{
output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);
hasSetFirst = true;
}
else
{
Union(tempRect, output, output);
}
}
}
}