In mobile and other touch screen software, scrolling is usually done using touch panning. It is typical for such panning to appear to "over-scroll" when reaching the beginning or end of the scrollable region. We should add a mode to the scrollbox widget to support this elastic, over-scroll behavior.
Created attachment 444895 [details] [diff] [review] WIP Not production-ready code - just a quick proof of concept I'm using for prototyping.
Created attachment 444994 [details] [diff] [review] WIP 2 Split out the new code into a self-contained XBL binding. Known issues: * Only works for horizontal scrolling; need to change this to work for vertical scrolling too, maybe depending on the "orient" attribute. (For Fennec at least, we have separate vertical and horizontal scrollboxes so we don't need a single control to do both at once.) * Having to specify an explicit margin size is ugly. The margins should be auto-sized based on the content size. * Snap-back should be animated (but allow animation to be disabled if necessary for performance). Mark, any thoughts on the API you would like to see for the elastic scrollbox control? This is the first significant amount of XBL I have written, so I appreciate any pointers.
Assignee: mbrubeck → nobody
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.