Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.ux.my_panel = Ext.extend( Ext.Panel, {
- initComponent : function() {
- app.ux.my_panel.superclass.initComponent.call(this, arguments);
- //Setup the scroller for BlackBerry
- var scrollList = this;
- this.on('mousemove', function(evt, div, el) {
- if (scrollList.scroller.offsetBoundary.top === 0) {
- scrollList.scroller.updateBoundary();
- }
- var maxOffset = scrollList.scroller.offsetBoundary[1] - 400;
- var bottom = scrollList.getHeight() - 15;
- //if (evt.xy[1] > 300 && scrollList.scroller.offset.y >= maxOffset) {
- if (evt.xy[1] > bottom && scrollList.scroller.offset.y >= maxOffset) {
- var offset = -1 * scrollList.scroller.offset.y + 10;
- scrollList.scroller.scrollTo({
- x: 0,
- y: offset
- });
- } else if (evt.xy[1] < 60 && scrollList.scroller.offset.y <= 0) {
- scrollList.scroller.scrollTo({
- x: 0,
- y: (-1 * scrollList.scroller.offset.y) - 10
- });
- }
- }, null, {element:'el'} );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement