Created
May 14, 2010 16:52
-
-
Save micmath/401374 to your computer and use it in GitHub Desktop.
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
var that = this; // this is a CarouselPane | |
this._focusable.on('beforeActivate', function(e) { | |
var toActivate = e.toActivateIndex; // index of the item that will become active | |
if (!that._inMotion) { // the CarouselPane wants to prevent move flooding | |
that.moveTo(toActivate, {callback: function() { // put the toActivate item in the spotlight | |
that._focusable.activateItem(toActivate); // now can manually activate the toActivate item | |
}}); | |
} | |
return false; // prevent Focusable from making the toActivate item active | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment