File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,11 @@ void GenericContentLayer::setPosition(CCPoint const& pos) {
25
25
26
26
for (auto child : CCArrayExt<CCNode*>(m_pChildren)) {
27
27
float childY = this ->getPositionY () + child->getPositionY ();
28
- float childTop = childY + (1 .f - child->getAnchorPoint ().y ) * child->getScaledContentSize ().height ;
28
+ auto anchor = child->isIgnoreAnchorPointForPosition () ? CCPoint{ 0 , 0 } : child->getAnchorPoint ();
29
+ float childTop = childY + (1 .f - anchor.y ) * child->getScaledContentSize ().height ;
29
30
float childBottom = childY - child->getAnchorPoint ().y * child->getScaledContentSize ().height ;
30
31
bool visible = childTop > 0 && childBottom < scrollLayerSize.height ;
31
-
32
+
32
33
child->setVisible (visible);
33
34
}
34
35
}
You can’t perform that action at this time.
0 commit comments