Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bug with left indent #9

Closed
andreypetrov opened this issue Jan 14, 2014 · 3 comments
Closed

A bug with left indent #9

andreypetrov opened this issue Jan 14, 2014 · 3 comments

Comments

@andreypetrov
Copy link

Hi, Emil,

a great component, thanks for creating it.

There is a bug in the dispatchDraw(Canvas canvas) method.
It should be instead of
canvas.translate(getPaddingLeft(), ...

canvas.translate(getLeftForViewRelativeOnlyChild(currentlyStickingView) + getPaddingLeft(), ...

The way it is now, if the sticky view is deeper in the hierarchy and to the left, then it jumps when it becomes sticky.

I am not sure if this calculation should be in the draw method or precalculated somehow, but definitely the left indent of parents needs to be taken into account when translating.

Thanks!

@parkin
Copy link
Contributor

parkin commented Jan 17, 2014

I've created a pull request with a fix. #10

@ccMatrix
Copy link

ccMatrix commented Feb 5, 2014

I see you fixed this issue. I had the same one and currently work around it using a sticky container. When will you update the latest release to include this fix? I am currently using 1.0.0 and do not see any newer release.

@emilsjolander
Copy link
Owner

I'll probably do a release in the weekend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants