mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[cocos2dx] Closes #378, bounding box will have zero width/height if all attachments are invisible
This commit is contained in:
parent
1c192cc3fb
commit
6e09fb8512
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user