Skip to content

Instantly share code, notes, and snippets.

@tonistiigi
Created April 29, 2013 20:45
Show Gist options
  • Save tonistiigi/5484637 to your computer and use it in GitHub Desktop.
Save tonistiigi/5484637 to your computer and use it in GitHub Desktop.
LimeJS Buttons inside scroller
// Answer for: https://groups.google.com/forum/?fromgroups=#!topic/limejs/ZcgYa72SvVk
var scroller = ..
scroller.moveHandler_ = function() {
lime.ui.Scroller.prototype.moveHandler_.apply(this, arguments)
scroller.hasMoved = true
}
scroller.upHandler_ = function() {
lime.ui.Scroller.prototype.upHandler_.apply(this, arguments)
scroller.hasMoved = false
}
var btn = ..
goog.events.listen(btn, 'click', function() {
// bail out if moved
if (scroller.hasMoved) return
// else handle click
console.log('i was clicked')
})
@amol-chavan
Copy link

thanks. It worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment