From e63a73e4c657538ba88b809516066389500b5c09 Mon Sep 17 00:00:00 2001 From: Andrew Chilton Date: Thu, 29 Nov 2012 16:59:49 +1300 Subject: [PATCH] Add ability to have a callback at the start of the clickToFocus animation --- jquery.roundabout.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jquery.roundabout.js b/jquery.roundabout.js index df83da2..df9bb58 100644 --- a/jquery.roundabout.js +++ b/jquery.roundabout.js @@ -77,6 +77,7 @@ btnStopAutoplay: null, easing: "swing", clickToFocus: true, + focusCallback: function() {}, clickToFocusCallback: function() {}, focusBearing: 0.0, shape: "lazySusan", @@ -188,6 +189,7 @@ if (!methods.isInFocus.apply(self, [degrees])) { methods.stopAnimation.apply($(this)); if (!self.data("roundabout").animating) { + self.data("roundabout").focusCallback(); methods.animateBearingToFocus.apply(self, [degrees, self.data("roundabout").clickToFocusCallback]); } return false;