ScrollView - Remove redundant codes.

This commit is contained in:
Neo Kim 2015-09-20 09:01:10 +09:00
parent 5de6aa78ec
commit 84d0625b93
1 changed files with 0 additions and 17 deletions

View File

@ -176,23 +176,6 @@ void ScrollView::setInnerContainerSize(const Size &size)
}
_innerContainer->setContentSize(Size(innerSizeWidth, innerSizeHeight));
// move children appropriately
{
Size newInnerSize = _innerContainer->getContentSize();
float offsetY = originalInnerSize.height - newInnerSize.height;
float offsetX = 0;
if (_innerContainer->getRightBoundary() <= _contentSize.width)
{
offsetX = originalInnerSize.width - newInnerSize.width;
}
if(offsetX != 0 || offsetY != 0)
{
Vec2 position = _innerContainer->getPosition() + Vec2(offsetX, offsetY);
setInnerContainerPosition(position);
}
}
// Calculate and set the position of the inner container.
Vec2 pos = _innerContainer->getPosition();
if (_innerContainer->getLeftBoundary() > 0.0f)