Skip to content

Instantly share code, notes, and snippets.

@tabrindle
Last active December 22, 2015 21:59
Show Gist options
  • Save tabrindle/6537316 to your computer and use it in GitHub Desktop.
Save tabrindle/6537316 to your computer and use it in GitHub Desktop.
Pause scrolling on listener in Sencha
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