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

ScrollPanel doesn't clamp correctly if its given SetScrollPos(x,y) with y larger than the allowable range #46

Open
silentwings opened this issue Mar 12, 2016 · 0 comments

Comments

@silentwings
Copy link

https://github.com/jk3064/chiliui/blob/master/luaui/chili/chili/controls/scrollpanel.lua#L69 should be changed to

self.scrollPosY = clamp(0, self.contentArea[4] - self.clientArea[4] - 1, self.scrollPosY)
Without the -1, the new 'maxed out' y value sometimes won't take effect.

I haven't tested if X scrolling is affected in the same way, or not.

@silentwings silentwings changed the title ScrollPanel doesn't clamp correctly if its given SetPos(x,y) with y larger than the allowable range ScrollPanel doesn't clamp correctly if its given SetScrollPos(x,y) with y larger than the allowable range Mar 12, 2016
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

1 participant