saim80/Cocos2D-Extensions — Issue #7: Issue with offsets for Horizontal table view
Author: krstns
Created: 2011-10-15 07:26:51+00:00
State: open

In the maxContainerOffset and minContainerOffset methods, you don't take into account horizontal scrolling.
Because of that, they are right aligned instead of left.
Unless this is desired behavior, this is how i fixed it:

```groovy
- (CGPoint)maxContainerOffset {
if (direction_ == SWScrollViewDirectionHorizontal) {
return ccp(viewSize_.width - container_.contentSize.width * container_.scaleX,
viewSize_.height - container_.contentSize.height * container_.scaleY);
} else {
return ccp(0.0f, 0.0f);
}

}

- (CGPoint)minContainerOffset {
if (direction_ == SWScrollViewDirectionHorizontal) {
return ccp(0.0f, 0.0f);
} else {
return ccp(viewSize_.width - container_.contentSize.width * container_.scaleX,
viewSize_.height - container_.contentSize.height * container_.scaleY);
}
}
```