We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81248da commit fc64742Copy full SHA for fc64742
1 file changed
src/pages/Tree.cpp
@@ -121,7 +121,16 @@ static CCRect getActualMenuRect(CCNode* menu) {
121
CCPoint topRight{};
122
123
for (auto node : CCArrayExt<CCNode>(menu->getChildren())) {
124
- auto bbox = node->boundingBox();
+ CCRect bbox;
125
+
126
+ if (typeinfo_cast<CCMenu*>(node)) {
127
+ auto basepos = node->getPosition() - (node->getAnchorPoint() * node->getScaledContentSize() * !node->isIgnoreAnchorPointForPosition());
128
129
+ bbox = getActualMenuRect(node);
130
+ bbox.origin += basepos;
131
+ } else {
132
+ bbox = node->boundingBox();
133
+ }
134
135
if (bbox.origin.x < bottomLeft.x) {
136
bottomLeft.x = bbox.origin.x;
0 commit comments