get current scroll/drag position of sencha touch panel
get current scroll/drag position of sencha touch panel
Hi All,
I'm using Sencha Touch 2. I am using a panel set to be scrollable vertically, and need to be able to get the current scroll position of the panel. I explored the Ext.scroll.View object returned from getScrollable(), and also Ext.scroll.Scroller but they don't seem to have a method to get current position, that I could find.
Looking in firebug at the object returned from getScrollable(), I did actually find a variable in there that gives me what I want, but it looks like it's intended to be private. It would be called like this ('myPanel' is just the panel instance):
Also, for anyone else interested in this, I figured out that 'lastDragPosition' is just the position the scroller was at when you released your finger, which is usually different than the final resting position. For the final resting position, it's just 'position', like: