Last active
December 22, 2015 21:59
-
-
Save tabrindle/6537316 to your computer and use it in GitHub Desktop.
Pause scrolling on listener in Sencha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listeners: { | |
dragstart: { | |
fn: function () { | |
y = this.parent.getScrollable().getScroller().position.y | |
this.parent.setScrollable({ | |
direction: 'false', | |
initialOffset: { | |
x: 0, | |
y: y | |
} | |
}) | |
this.parent.setPadding(10) | |
}, | |
element: 'element' | |
}, | |
dragend: { | |
fn: function () { | |
var scope = this.parent | |
setTimeout(function(){ | |
scope.setScrollable({ | |
direction: 'vertical', | |
initialOffset: { | |
x: 0, | |
y: y | |
} | |
}) | |
scope.setPadding(10) | |
}, 200) | |
}, | |
element: 'element' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment