From 9dc50635af4acf4f43dd80f0309780f878386f7a Mon Sep 17 00:00:00 2001 From: Alex Kneller Date: Thu, 28 Nov 2013 11:19:51 +0200 Subject: [PATCH 1/4] fallback for special easing that use CUBIC_BEZIER --- scripts/src/jquery.animate-enhanced.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/src/jquery.animate-enhanced.js b/scripts/src/jquery.animate-enhanced.js index 90229ef..1d46166 100644 --- a/scripts/src/jquery.animate-enhanced.js +++ b/scripts/src/jquery.animate-enhanced.js @@ -667,6 +667,10 @@ Changelog: bypassPlugin = (typeof prop['avoidCSSTransitions'] !== 'undefined') ? prop['avoidCSSTransitions'] : pluginDisabledDefault; if (bypassPlugin === true || !cssTransitionsSupported || _isEmptyObject(prop) || _isBoxShortcut(prop) || optall.duration <= 0 || optall.step) { + //fallback for special easing that use CUBIC_BEZIER. + if(arguments[2] !== 'linear' && arguments[2] !== 'swipe'){ + arguments[2] = 'linear' + } return originalAnimateMethod.apply(this, arguments); } From 9696dfbacbd3a6f832c92c7533345ad5d86b6d93 Mon Sep 17 00:00:00 2001 From: Alex Kneller Date: Thu, 28 Nov 2013 11:33:58 +0200 Subject: [PATCH 2/4] *swipe swing fix --- scripts/src/jquery.animate-enhanced.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/src/jquery.animate-enhanced.js b/scripts/src/jquery.animate-enhanced.js index 1d46166..433d180 100644 --- a/scripts/src/jquery.animate-enhanced.js +++ b/scripts/src/jquery.animate-enhanced.js @@ -668,7 +668,7 @@ Changelog: if (bypassPlugin === true || !cssTransitionsSupported || _isEmptyObject(prop) || _isBoxShortcut(prop) || optall.duration <= 0 || optall.step) { //fallback for special easing that use CUBIC_BEZIER. - if(arguments[2] !== 'linear' && arguments[2] !== 'swipe'){ + if(arguments[2] !== 'linear' && arguments[2] !== 'swing'){ arguments[2] = 'linear' } return originalAnimateMethod.apply(this, arguments); From b6f68bfa95b903c8c3ece321065c028d8ca134e7 Mon Sep 17 00:00:00 2001 From: Alex Kneller Date: Tue, 10 Dec 2013 08:35:21 +0200 Subject: [PATCH 3/4] check for existence of easing before fallback --- scripts/src/jquery.animate-enhanced.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/src/jquery.animate-enhanced.js b/scripts/src/jquery.animate-enhanced.js index 433d180..d20f54b 100644 --- a/scripts/src/jquery.animate-enhanced.js +++ b/scripts/src/jquery.animate-enhanced.js @@ -668,8 +668,10 @@ Changelog: if (bypassPlugin === true || !cssTransitionsSupported || _isEmptyObject(prop) || _isBoxShortcut(prop) || optall.duration <= 0 || optall.step) { //fallback for special easing that use CUBIC_BEZIER. - if(arguments[2] !== 'linear' && arguments[2] !== 'swing'){ - arguments[2] = 'linear' + if($.easing && !$.easing.hasOwnProperty(arguments[2])) { + if((arguments[2] !== 'linear' && arguments[2] !== 'swing') ){ + arguments[2] = 'swing'; + } } return originalAnimateMethod.apply(this, arguments); } From 7610d98db3fb2ea64ac29c5f833c80dee1093aed Mon Sep 17 00:00:00 2001 From: Alex Kneller Date: Tue, 10 Dec 2013 08:38:43 +0200 Subject: [PATCH 4/4] change fallback easing from swing to linear --- scripts/src/jquery.animate-enhanced.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/src/jquery.animate-enhanced.js b/scripts/src/jquery.animate-enhanced.js index d20f54b..c519993 100644 --- a/scripts/src/jquery.animate-enhanced.js +++ b/scripts/src/jquery.animate-enhanced.js @@ -670,7 +670,7 @@ Changelog: //fallback for special easing that use CUBIC_BEZIER. if($.easing && !$.easing.hasOwnProperty(arguments[2])) { if((arguments[2] !== 'linear' && arguments[2] !== 'swing') ){ - arguments[2] = 'swing'; + arguments[2] = 'linear'; } } return originalAnimateMethod.apply(this, arguments);