vendor/assets/javascripts/greensock/TweenMax.js in greensock-rails-1.11.4.1 vs vendor/assets/javascripts/greensock/TweenMax.js in greensock-rails-1.11.5.0
- old
+ new
@@ -1,8 +1,8 @@
/*!
- * VERSION: 1.11.4
- * DATE: 2014-01-18
+ * VERSION: 1.11.5
+ * DATE: 2014-02-20
* UPDATES AND DOCS AT: http://www.greensock.com
*
* Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
*
* @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -32,11 +32,11 @@
_isSelector = TweenLite._internals.isSelector,
_isArray = TweenLite._internals.isArray,
p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
_blankArray = [];
- TweenMax.version = "1.11.4";
+ TweenMax.version = "1.11.5";
p.constructor = TweenMax;
p.kill()._gc = false;
TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
TweenMax.getTweensOf = TweenLite.getTweensOf;
TweenMax.ticker = TweenLite.ticker;
@@ -605,11 +605,11 @@
}
},
_slice = _blankArray.slice,
p = TimelineLite.prototype = new SimpleTimeline();
- TimelineLite.version = "1.11.4";
+ TimelineLite.version = "1.11.5";
p.constructor = TimelineLite;
p.kill()._gc = false;
p.to = function(target, duration, vars, position) {
return duration ? this.add( new TweenLite(target, duration, vars), position) : this.set(target, vars, position);
@@ -727,19 +727,19 @@
}
}
SimpleTimeline.prototype.add.call(this, value, position);
- //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly.
- if (this._gc) if (!this._paused) if (this._duration < this.duration()) {
- //in case any of the anscestors had completed but should now be enabled...
+ //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate.
+ if (this._gc || this._time === this._duration) if (!this._paused) if (this._duration < this.duration()) {
+ //in case any of the ancestors had completed but should now be enabled...
tl = this;
beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect.
- while (tl._gc && tl._timeline) {
- if (tl._timeline.smoothChildTiming && beforeRawTime) {
+ while (tl._timeline) {
+ if (beforeRawTime && tl._timeline.smoothChildTiming) {
tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it.
- } else {
+ } else if (tl._gc) {
tl._enabled(true, false);
}
tl = tl._timeline;
}
}
@@ -764,11 +764,11 @@
p._remove = function(tween, skipDisable) {
SimpleTimeline.prototype._remove.call(this, tween, skipDisable);
var last = this._last;
if (!last) {
- this._time = this._totalTime = 0;
+ this._time = this._totalTime = this._duration = this._totalDuration = 0;
} else if (this._time > last._startTime + last._totalDuration / last._timeScale) {
this._time = this.duration();
this._totalTime = this._totalDuration;
}
return this;
@@ -1202,11 +1202,11 @@
_easeNone = new Ease(null, null, 1, 0),
p = TimelineMax.prototype = new TimelineLite();
p.constructor = TimelineMax;
p.kill()._gc = false;
- TimelineMax.version = "1.11.4";
+ TimelineMax.version = "1.11.5";
p.invalidate = function() {
this._yoyo = (this.vars.yoyo === true);
this._repeat = this.vars.repeat || 0;
this._repeatDelay = this.vars.repeatDelay || 0;
@@ -2224,11 +2224,11 @@
_overwriteProps, //alias to the currently instantiating CSSPlugin's _overwriteProps array. We use this closure in order to avoid having to pass a reference around from method to method and aid in minification.
_specialProps = {},
p = CSSPlugin.prototype = new TweenPlugin("css");
p.constructor = CSSPlugin;
- CSSPlugin.version = "1.11.4";
+ CSSPlugin.version = "1.11.5";
CSSPlugin.API = 2;
CSSPlugin.defaultTransformPerspective = 0;
p = "px"; //we'll reuse the "p" variable to keep file size down
CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""};
@@ -2290,11 +2290,11 @@
}
},
_prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-"
_prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz".
- //@private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all)
+ // @private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all)
_checkPropPrefix = function(p, e) {
e = e || _tempDiv;
var s = e.style,
a, i;
if (s[p] !== undefined) {
@@ -2385,11 +2385,11 @@
var dim = ((p === "left") ? "Left" : "Top"),
v = _getStyle(t, "margin" + dim, cs);
return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), v.replace(_suffixExp, "")) || 0);
},
- //@private returns at object containing ALL of the style properties in camelCase and their associated values.
+ // @private returns at object containing ALL of the style properties in camelCase and their associated values.
_getAllStyles = function(t, cs) {
var s = {},
i, tr;
if ((cs = cs || _getComputedStyle(t, null))) {
if ((i = cs.length)) {
@@ -2401,11 +2401,11 @@
s[i] = cs[i];
}
}
} else if ((cs = t.currentStyle || t.style)) {
for (i in cs) {
- if (typeof(i) === "string" && s[i] !== undefined) {
+ if (typeof(i) === "string" && s[i] === undefined) {
s[i.replace(_camelExp, _camelFunc)] = cs[i];
}
}
}
if (!_supportsOpacity) {
@@ -2428,11 +2428,11 @@
delete s.filters;
}
return s;
},
- //@private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object containing only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details.
+ // @private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object containing only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details.
_cssDif = function(t, s1, s2, vars, forceLookup) {
var difs = {},
style = t.style,
val, p, mpt;
for (p in s2) {
@@ -2472,11 +2472,11 @@
v -= parseFloat( _getStyle(t, "border" + a[i] + "Width", cs, true) ) || 0;
}
return v;
},
- //@private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value)
+ // @private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value)
_parsePosition = function(v, recObj) {
if (v == null || v === "" || v === "auto" || v === "auto auto") { //note: Firefox uses "auto auto" as default whereas Chrome uses "auto".
v = "0 0";
}
var a = v.split(" "),
@@ -2736,11 +2736,11 @@
}
return cssp.parse(t, vars, pt, plugin);
};
},
- //@private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color.
+ // @private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color.
_setPluginRatio = _internals._setPluginRatio = function(v) {
this.plugin.setRatio(v);
var d = this.data,
proxy = d.proxy,
mpt = d.firstMPT,
@@ -5878,10 +5878,10 @@
p.ratio = 0;
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
p._notifyPluginsOfEnabled = false;
- TweenLite.version = "1.11.4";
+ TweenLite.version = "1.11.5";
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
TweenLite.defaultOverwrite = "auto";
TweenLite.ticker = _ticker;
TweenLite.autoSleep = true;
TweenLite.selector = window.$ || window.jQuery || function(e) { if (window.$) { TweenLite.selector = window.$; return window.$(e); } return window.document ? window.document.getElementById((e.charAt(0) === "#") ? e.substr(1) : e) : e; };
\ No newline at end of file