Created
April 29, 2013 20:45
-
-
Save tonistiigi/5484637 to your computer and use it in GitHub Desktop.
LimeJS Buttons inside scroller
This file contains hidden or 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
// 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') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks. It worked for me.