From ddfae392803d13f17708a11ed3c871293f8af87f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 20 Oct 2014 18:59:57 +0800 Subject: [PATCH] fix return this.Tweenable is undefined --- src/directives/shifty.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/directives/shifty.js b/src/directives/shifty.js index 27fee91..c327e38 100644 --- a/src/directives/shifty.js +++ b/src/directives/shifty.js @@ -4,7 +4,7 @@ angular.module('angular-carousel.shifty', []) .factory('Tweenable', function() { - (function (root) { + (function (root, window) { /*! * Shifty Core * By Jeremy Kahn - jeremyckahn@gmail.com @@ -456,7 +456,8 @@ angular.module('angular-carousel.shifty', []) return Tweenable; } ()); - + + window.Tweenable = Tweenable; /*! * All equations are adapted from Thomas Fuchs' [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js). * @@ -1377,7 +1378,7 @@ angular.module('angular-carousel.shifty', []) } (Tweenable)); - }(this)); + }(this, window)); - return this.Tweenable; + return window.Tweenable; });