Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Aubry <mattab@users.noreply.github.com>2016-06-28 08:50:40 +0300
committerGitHub <noreply@github.com>2016-06-28 08:50:40 +0300
commit02daed6db8fb7269d1b3a466cbb32ed7fab76e85 (patch)
treea534b2905593d44eece6a9f896522e524cb0d28f /libs/bower_components/jquery/src/effects/Tween.js
parentf981b2579a95ce60a2b7d2aa146925b4d2222e0a (diff)
Update JQuery to the latest 1.12.4 version (#10260)
* Update JQuery to the latest 1.* version * UI tests: Updated Jquery to latest version
Diffstat (limited to 'libs/bower_components/jquery/src/effects/Tween.js')
-rw-r--r--libs/bower_components/jquery/src/effects/Tween.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/libs/bower_components/jquery/src/effects/Tween.js b/libs/bower_components/jquery/src/effects/Tween.js
index 12eec55cfc..33edf10f39 100644
--- a/libs/bower_components/jquery/src/effects/Tween.js
+++ b/libs/bower_components/jquery/src/effects/Tween.js
@@ -1,4 +1,4 @@
-define([
+define( [
"../core",
"../css"
], function( jQuery ) {
@@ -13,7 +13,7 @@ Tween.prototype = {
init: function( elem, options, prop, end, easing, unit ) {
this.elem = elem;
this.prop = prop;
- this.easing = easing || "swing";
+ this.easing = easing || jQuery.easing._default;
this.options = options;
this.start = this.now = this.cur();
this.end = end;
@@ -59,8 +59,10 @@ Tween.propHooks = {
get: function( tween ) {
var result;
- if ( tween.elem[ tween.prop ] != null &&
- (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ // Use a property on the element directly when it is not a DOM element,
+ // or when there is no matching style property that exists.
+ if ( tween.elem.nodeType !== 1 ||
+ tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
return tween.elem[ tween.prop ];
}
@@ -69,15 +71,19 @@ Tween.propHooks = {
// so, simple values such as "10px" are parsed to Float.
// complex values such as "rotate(1rad)" are returned as is.
result = jQuery.css( tween.elem, tween.prop, "" );
+
// Empty strings, null, undefined and "auto" are converted to 0.
return !result || result === "auto" ? 0 : result;
},
set: function( tween ) {
+
// use step hook for back compat - use cssHook if its there - use .style if its
// available and use plain properties where available
if ( jQuery.fx.step[ tween.prop ] ) {
jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ } else if ( tween.elem.nodeType === 1 &&
+ ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
+ jQuery.cssHooks[ tween.prop ] ) ) {
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
} else {
tween.elem[ tween.prop ] = tween.now;
@@ -103,7 +109,8 @@ jQuery.easing = {
},
swing: function( p ) {
return 0.5 - Math.cos( p * Math.PI ) / 2;
- }
+ },
+ _default: "swing"
};
jQuery.fx = Tween.prototype.init;
@@ -111,4 +118,4 @@ jQuery.fx = Tween.prototype.init;
// Back Compat <1.8 extension point
jQuery.fx.step = {};
-});
+} );