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