[cocos2dx] Closes #378, bounding box will have zero width/height if all attachments are invisible

This commit is contained in:
badlogic 2016-07-18 15:23:38 +02:00
parent 1c192cc3fb
commit 6e09fb8512

View File

@ -308,6 +308,7 @@ Rect SkeletonRenderer::getBoundingBox () const {
}
}
Vec2 position = getPosition();
if (minX == FLT_MAX) minX = minY = maxX = maxY = 0;
return Rect(position.x + minX, position.y + minY, maxX - minX, maxY - minY);
}