Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
If size (more specifically -- height) of inner container in ScrollView was changed (from X to Y) during autoscroll then content of container visually "jumps up" (by (Y - X)).
It happens because implementation of ScrollView::processAutoScrolling set newPosition based on _autoScrollStartPosition which is set in ScrollView::startAutoScroll and which is not changing when size is updated.
I fixed this issue by adding compensation to _autoScrollStartPosition in ScrollView::setInnerContainerSize function.
If size (more specifically -- height) of inner container in
ScrollView
was changed (fromX
toY
) during autoscroll then content of container visually "jumps up" (by (Y - X
)).It happens because implementation of
ScrollView::processAutoScrolling
setnewPosition
based on_autoScrollStartPosition
which is set inScrollView::startAutoScroll
and which is not changing when size is updated.I fixed this issue by adding compensation to
_autoScrollStartPosition
inScrollView::setInnerContainerSize
function.