greensock-rails 1.15.1.0 → 1.16.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/greensock/rails/version.rb +1 -1
- data/vendor/assets/javascripts/greensock/TimelineLite.js +92 -52
- data/vendor/assets/javascripts/greensock/TimelineMax.js +62 -10
- data/vendor/assets/javascripts/greensock/TweenLite.js +13 -10
- data/vendor/assets/javascripts/greensock/TweenMax.js +160 -56
- data/vendor/assets/javascripts/greensock/easing/EasePack.js +8 -7
- data/vendor/assets/javascripts/greensock/jquery.gsap.js +15 -5
- data/vendor/assets/javascripts/greensock/plugins/CSSPlugin.js +81 -34
- data/vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js +23 -20
- data/vendor/assets/javascripts/greensock/plugins/ScrollToPlugin.js +5 -5
- data/vendor/assets/javascripts/greensock/utils/Draggable.js +302 -66
- metadata +2 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: beta 1.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: beta 1.15.2
|
3
|
+
* DATE: 2015-01-27
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
|
@@ -274,9 +274,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
274
274
|
//Elastic
|
275
275
|
_createElastic = function(n, f, def) {
|
276
276
|
var C = _class("easing." + n, function(amplitude, period) {
|
277
|
-
this._p1 = amplitude
|
278
|
-
this._p2 = period || def;
|
277
|
+
this._p1 = (amplitude >= 1) ? amplitude : 1; //note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1.
|
278
|
+
this._p2 = (period || def) / (amplitude < 1 ? amplitude : 1);
|
279
279
|
this._p3 = this._p2 / _2PI * (Math.asin(1 / this._p1) || 0);
|
280
|
+
this._p2 = _2PI / this._p2; //precalculate to optimize
|
280
281
|
}, true),
|
281
282
|
p = C.prototype = new Ease();
|
282
283
|
p.constructor = C;
|
@@ -288,13 +289,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
288
289
|
};
|
289
290
|
_wrap("Elastic",
|
290
291
|
_createElastic("ElasticOut", function(p) {
|
291
|
-
return this._p1 * Math.pow(2, -10 * p) * Math.sin( (p - this._p3) *
|
292
|
+
return this._p1 * Math.pow(2, -10 * p) * Math.sin( (p - this._p3) * this._p2 ) + 1;
|
292
293
|
}, 0.3),
|
293
294
|
_createElastic("ElasticIn", function(p) {
|
294
|
-
return -(this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) *
|
295
|
+
return -(this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2 ));
|
295
296
|
}, 0.3),
|
296
297
|
_createElastic("ElasticInOut", function(p) {
|
297
|
-
return ((p *= 2) < 1) ? -0.5 * (this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) *
|
298
|
+
return ((p *= 2) < 1) ? -0.5 * (this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2)) : this._p1 * Math.pow(2, -10 *(p -= 1)) * Math.sin( (p - this._p3) * this._p2 ) * 0.5 + 1;
|
298
299
|
}, 0.45)
|
299
300
|
);
|
300
301
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 0.1.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 0.1.10
|
3
|
+
* DATE: 2015-02-13
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com/jquery-gsap-plugin/
|
5
5
|
*
|
6
6
|
* Requires TweenLite version 1.8.0 or higher and CSSPlugin.
|
@@ -27,6 +27,8 @@
|
|
27
27
|
return copy;
|
28
28
|
},
|
29
29
|
_reserved = {overwrite:1, delay:1, useFrames:1, runBackwards:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, autoCSS:1},
|
30
|
+
_defaultLegacyProps = ",scrollTop,scrollLeft,show,hide,toggle,",
|
31
|
+
_legacyProps = _defaultLegacyProps,
|
30
32
|
_copyCriticalReserved = function(main, sub) {
|
31
33
|
for (var p in _reserved) {
|
32
34
|
if (_reserved[p] && main[p] !== undefined) {
|
@@ -75,7 +77,7 @@
|
|
75
77
|
return _animate.call(this, prop, speed, easing, callback);
|
76
78
|
}
|
77
79
|
}
|
78
|
-
if (!_enabled || prop.skipGSAP === true || (typeof(speed) === "object" && typeof(speed.step) === "function")
|
80
|
+
if (!_enabled || prop.skipGSAP === true || (typeof(speed) === "object" && typeof(speed.step) === "function")) { //we don't support the "step" feature because it's too costly performance-wise, so fall back to the native animate() call if we sense one. Same with scrollTop and scrollLeft which are handled in a special way in jQuery.
|
79
81
|
return _animate.call(this, prop, speed, easing, callback);
|
80
82
|
}
|
81
83
|
var config = $.speed(speed, easing, callback),
|
@@ -91,7 +93,7 @@
|
|
91
93
|
specEasing[p] = val[1];
|
92
94
|
val = val[0];
|
93
95
|
}
|
94
|
-
if (
|
96
|
+
if (_legacyProps.indexOf(p) !== -1 && _legacyProps.indexOf("," + p + ",") !== -1) {
|
95
97
|
return _animate.call(this, prop, speed, easing, callback);
|
96
98
|
} else {
|
97
99
|
vars[(p.indexOf("-") === -1) ? p : $.camelCase(p)] = val;
|
@@ -170,6 +172,14 @@
|
|
170
172
|
return this;
|
171
173
|
};
|
172
174
|
|
173
|
-
$.gsap = {
|
175
|
+
$.gsap = {
|
176
|
+
enabled:function(value) {
|
177
|
+
_enabled = value;
|
178
|
+
},
|
179
|
+
version:"0.1.10",
|
180
|
+
legacyProps:function(value) {
|
181
|
+
_legacyProps = _defaultLegacyProps + value + ",";
|
182
|
+
}
|
183
|
+
};
|
174
184
|
|
175
185
|
}(jQuery));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.
|
3
|
-
* DATE: 2015-01
|
2
|
+
* VERSION: 1.16.0
|
3
|
+
* DATE: 2015-03-01
|
4
4
|
* UPDATES AND DOCS AT: http://www.greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
|
@@ -31,7 +31,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
31
31
|
p = CSSPlugin.prototype = new TweenPlugin("css");
|
32
32
|
|
33
33
|
p.constructor = CSSPlugin;
|
34
|
-
CSSPlugin.version = "1.
|
34
|
+
CSSPlugin.version = "1.16.0";
|
35
35
|
CSSPlugin.API = 2;
|
36
36
|
CSSPlugin.defaultTransformPerspective = 0;
|
37
37
|
CSSPlugin.defaultSkewType = "compensated";
|
@@ -208,11 +208,20 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
208
208
|
// @private returns at object containing ALL of the style properties in camelCase and their associated values.
|
209
209
|
_getAllStyles = function(t, cs) {
|
210
210
|
var s = {},
|
211
|
-
i, tr;
|
211
|
+
i, tr, p;
|
212
212
|
if ((cs = cs || _getComputedStyle(t, null))) {
|
213
|
-
|
214
|
-
|
215
|
-
|
213
|
+
if ((i = cs.length)) {
|
214
|
+
while (--i > -1) {
|
215
|
+
p = cs[i];
|
216
|
+
if (p.indexOf("-transform") === -1 || _transformPropCSS === p) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here.
|
217
|
+
s[p.replace(_camelExp, _camelFunc)] = cs.getPropertyValue(p);
|
218
|
+
}
|
219
|
+
}
|
220
|
+
} else { //some browsers behave differently - cs.length is always 0, so we must do a for...in loop.
|
221
|
+
for (i in cs) {
|
222
|
+
if (i.indexOf("Transform") === -1 || _transformProp === i) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here.
|
223
|
+
s[i] = cs[i];
|
224
|
+
}
|
216
225
|
}
|
217
226
|
}
|
218
227
|
} else if ((cs = t.currentStyle || t.style)) {
|
@@ -764,7 +773,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
764
773
|
bv = ba[i];
|
765
774
|
ev = ea[i];
|
766
775
|
bn = parseFloat(bv);
|
767
|
-
|
768
776
|
//if the value begins with a number (most common). It's fine if it has a suffix like px
|
769
777
|
if (bn || bn === 0) {
|
770
778
|
pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1), true);
|
@@ -978,8 +986,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
978
986
|
bi = b.indexOf(kwd);
|
979
987
|
ei = e.indexOf(kwd);
|
980
988
|
if (bi !== ei) {
|
981
|
-
|
982
|
-
|
989
|
+
if (ei === -1) { //if the keyword isn't in the end value, remove it from the beginning one.
|
990
|
+
ba[i] = ba[i].split(kwd).join("");
|
991
|
+
} else if (bi === -1) { //if the keyword isn't in the beginning, add it.
|
992
|
+
ba[i] += " " + kwd;
|
993
|
+
}
|
983
994
|
}
|
984
995
|
}
|
985
996
|
}
|
@@ -1046,8 +1057,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1046
1057
|
|
1047
1058
|
|
1048
1059
|
|
1049
|
-
|
1050
1060
|
//transform-related methods and properties
|
1061
|
+
CSSPlugin.useSVGTransformAttr = _isSafari; //Safari has some rendering bugs when applying CSS transforms to SVG elements, so default to using the "transform" attribute instead.
|
1051
1062
|
var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent").split(","),
|
1052
1063
|
_transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform.
|
1053
1064
|
_transformPropCSS = _prefixCSS + "transform",
|
@@ -1071,7 +1082,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1071
1082
|
container.appendChild(element);
|
1072
1083
|
return element;
|
1073
1084
|
},
|
1074
|
-
_docElement =
|
1085
|
+
_docElement = _doc.documentElement,
|
1075
1086
|
_forceSVGTransformAttr = (function() {
|
1076
1087
|
//IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute. We populate this variable in the _parseTransform() method, and only if/when we come across an SVG element
|
1077
1088
|
var force = _ieVers || (/Android/i.test(_agent) && !window.chrome),
|
@@ -1087,11 +1098,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1087
1098
|
}
|
1088
1099
|
return force;
|
1089
1100
|
})(),
|
1090
|
-
_parseSVGOrigin = function(e,
|
1091
|
-
var bbox
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1101
|
+
_parseSVGOrigin = function(e, local, decoratee, absolute) {
|
1102
|
+
var bbox, v;
|
1103
|
+
if (!absolute || !(v = absolute.split(" ")).length) {
|
1104
|
+
bbox = e.getBBox();
|
1105
|
+
local = _parsePosition(local).split(" ");
|
1106
|
+
v = [(local[0].indexOf("%") !== -1 ? parseFloat(local[0]) / 100 * bbox.width : parseFloat(local[0])) + bbox.x,
|
1107
|
+
(local[1].indexOf("%") !== -1 ? parseFloat(local[1]) / 100 * bbox.height : parseFloat(local[1])) + bbox.y];
|
1108
|
+
}
|
1109
|
+
decoratee.xOrigin = parseFloat(v[0]);
|
1110
|
+
decoratee.yOrigin = parseFloat(v[1]);
|
1111
|
+
e.setAttribute("data-svg-origin", v.join(" "));
|
1095
1112
|
},
|
1096
1113
|
|
1097
1114
|
/**
|
@@ -1123,10 +1140,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1123
1140
|
isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
|
1124
1141
|
tm.svg = !!(_SVGElement && typeof(t.getBBox) === "function" && t.getCTM && (!t.parentNode || (t.parentNode.getBBox && t.parentNode.getCTM))); //don't just rely on "instanceof _SVGElement" because if the SVG is embedded via an object tag, it won't work (SVGElement is mapped to a different object)
|
1125
1142
|
if (tm.svg) {
|
1126
|
-
|
1143
|
+
if (isDefault && (t.style[_transformProp] + "").indexOf("matrix") !== -1) { //some browsers (like Chrome 40) don't correctly report transforms that are applied inline on an SVG element (they don't get included in the computed style), so we double-check here and accept matrix values
|
1144
|
+
s = t.style[_transformProp];
|
1145
|
+
isDefault = false;
|
1146
|
+
}
|
1147
|
+
_parseSVGOrigin(t, _getStyle(t, _transformOriginProp, _cs, false, "50% 50%") + "", tm, t.getAttribute("data-svg-origin"));
|
1127
1148
|
_useSVGTransformAttr = CSSPlugin.useSVGTransformAttr || _forceSVGTransformAttr;
|
1128
1149
|
m = t.getAttribute("transform");
|
1129
|
-
if (isDefault && m && m.indexOf("matrix") !== -1) { //just in case there's a "
|
1150
|
+
if (isDefault && m && m.indexOf("matrix") !== -1) { //just in case there's a "transform" value specified as an attribute instead of CSS style. Only accept a matrix, though.
|
1130
1151
|
s = m;
|
1131
1152
|
isDefault = 0;
|
1132
1153
|
}
|
@@ -1214,6 +1235,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1214
1235
|
tm.x = a14;
|
1215
1236
|
tm.y = a24;
|
1216
1237
|
tm.z = a34;
|
1238
|
+
if (tm.svg) {
|
1239
|
+
tm.x -= tm.xOrigin - (tm.xOrigin * a11 - tm.yOrigin * a12);
|
1240
|
+
tm.y -= tm.yOrigin - (tm.yOrigin * a21 - tm.xOrigin * a22);
|
1241
|
+
}
|
1217
1242
|
|
1218
1243
|
} else if ((!_supports3D || parse || !m.length || tm.x !== m[4] || tm.y !== m[5] || (!tm.rotationX && !tm.rotationY)) && !(tm.x !== undefined && _getStyle(t, "display", cs) === "none")) { //sometimes a 6-element matrix is returned even when we performed 3D transforms, like if rotationX and rotationY are 180. In cases like this, we still need to honor the 3D transforms. If we just rely on the 2D info, it could affect how the data is interpreted, like scaleY might get set to -1 or rotation could get offset by 180 degrees. For example, do a TweenLite.to(element, 1, {css:{rotationX:180, rotationY:180}}) and then later, TweenLite.to(element, 1, {css:{rotationX:0}}) and without this conditional logic in place, it'd jump to a state of being unrotated when the 2nd tween starts. Then again, we need to honor the fact that the user COULD alter the transforms outside of CSSPlugin, like by manually applying new css, so we try to sense that by looking at x and y because if those changed, we know the changes were made outside CSSPlugin and we force a reinterpretation of the matrix values. Also, in Webkit browsers, if the element's "display" is "none", its calculated style value will always return empty, so if we've already recorded the values in the _gsTransform object, we'll just rely on those.
|
1219
1244
|
var k = (m.length >= 6),
|
@@ -1246,6 +1271,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1246
1271
|
tm.perspective = defaultTransformPerspective;
|
1247
1272
|
tm.scaleZ = 1;
|
1248
1273
|
}
|
1274
|
+
if (tm.svg) {
|
1275
|
+
tm.x -= tm.xOrigin - (tm.xOrigin * a - tm.yOrigin * b);
|
1276
|
+
tm.y -= tm.yOrigin - (tm.yOrigin * d - tm.xOrigin * c);
|
1277
|
+
}
|
1249
1278
|
}
|
1250
1279
|
tm.zOrigin = zOrigin;
|
1251
1280
|
//some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 0 in these cases. The conditional logic here is faster than calling Math.abs(). Also, browsers tend to render a SLIGHTLY rotated object in a fuzzy way, so we need to snap to exactly 0 when appropriate.
|
@@ -1258,6 +1287,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1258
1287
|
//DEBUG: _log("parsed rotation of " + t.getAttribute("id")+": "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective);
|
1259
1288
|
if (rec) {
|
1260
1289
|
t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method)
|
1290
|
+
if (tm.svg) { //if we're supposed to apply transforms to the SVG element's "transform" attribute, make sure there aren't any CSS transforms applied or they'll override the attribute ones. Also clear the transform attribute if we're using CSS, just to be clean.
|
1291
|
+
if (_useSVGTransformAttr && t.style[_transformProp]) {
|
1292
|
+
_removeProp(t.style, _transformProp);
|
1293
|
+
} else if (!_useSVGTransformAttr && t.getAttribute("transform")) {
|
1294
|
+
t.removeAttribute("transform");
|
1295
|
+
}
|
1296
|
+
}
|
1261
1297
|
}
|
1262
1298
|
return tm;
|
1263
1299
|
},
|
@@ -1362,7 +1398,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1362
1398
|
perspective = t.perspective,
|
1363
1399
|
a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43,
|
1364
1400
|
zOrigin, min, cos, sin, t1, t2, transform, comma, zero;
|
1365
|
-
if (v === 1 || v === 0 || !t.force3D) if (t.force3D !== true) if (!t.rotationY && !t.rotationX && sz === 1 && !perspective && !z) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices
|
1401
|
+
if (v === 1 || v === 0 || !t.force3D) if (t.force3D !== true) if (!t.rotationY && !t.rotationX && sz === 1 && !perspective && !z && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices. Check the tween's totalTime/totalDuration too in order to make sure it doesn't happen between repeats if it's a repeating tween.
|
1366
1402
|
_set2DTransformRatio.call(this, v);
|
1367
1403
|
return;
|
1368
1404
|
}
|
@@ -1518,7 +1554,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1518
1554
|
style = targ.style,
|
1519
1555
|
x = t.x,
|
1520
1556
|
y = t.y,
|
1521
|
-
ang, skew, rnd, sx, sy, a, b, c, d, matrix, min;
|
1557
|
+
ang, skew, rnd, sx, sy, a, b, c, d, matrix, min, t1;
|
1522
1558
|
if ((t.rotationX || t.rotationY || t.z || t.force3D === true || (t.force3D === "auto" && v !== 1 && v !== 0)) && !(t.svg && _useSVGTransformAttr) && _supports3D) { //if a 3D tween begins while a 2D one is running, we need to kick the rendering over to the 3D method. For example, imagine a yoyo-ing, infinitely repeating scale tween running, and then the object gets rotated in 3D space with a different tween.
|
1523
1559
|
this.setRatio = _set3DTransformRatio;
|
1524
1560
|
_set3DTransformRatio.call(this, v);
|
@@ -1528,12 +1564,18 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1528
1564
|
sy = t.scaleY;
|
1529
1565
|
if (t.rotation || t.skewX || t.svg) {
|
1530
1566
|
ang = t.rotation * _DEG2RAD;
|
1531
|
-
skew =
|
1567
|
+
skew = t.skewX * _DEG2RAD;
|
1532
1568
|
rnd = 100000;
|
1533
1569
|
a = Math.cos(ang) * sx;
|
1534
1570
|
b = Math.sin(ang) * sx;
|
1535
|
-
c = Math.sin(skew) * -sy;
|
1536
|
-
d = Math.cos(skew) * sy;
|
1571
|
+
c = Math.sin(ang - skew) * -sy;
|
1572
|
+
d = Math.cos(ang - skew) * sy;
|
1573
|
+
if (skew && t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does
|
1574
|
+
t1 = Math.tan(skew);
|
1575
|
+
t1 = Math.sqrt(1 + t1 * t1);
|
1576
|
+
c *= t1;
|
1577
|
+
d *= t1;
|
1578
|
+
}
|
1537
1579
|
if (t.svg) {
|
1538
1580
|
x += t.xOrigin - (t.xOrigin * a + t.yOrigin * c);
|
1539
1581
|
y += t.yOrigin - (t.xOrigin * b + t.yOrigin * d);
|
@@ -1561,7 +1603,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1561
1603
|
p.x = p.y = p.z = p.skewX = p.skewY = p.rotation = p.rotationX = p.rotationY = p.zOrigin = p.xPercent = p.yPercent = 0;
|
1562
1604
|
p.scaleX = p.scaleY = p.scaleZ = 1;
|
1563
1605
|
|
1564
|
-
_registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent", {parser:function(t, e, p, cssp, pt, plugin, vars) {
|
1606
|
+
_registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent", {parser:function(t, e, p, cssp, pt, plugin, vars) {
|
1565
1607
|
if (cssp._lastParsedTransform === vars) { return pt; } //only need to parse the transform once, and only if the browser supports it.
|
1566
1608
|
cssp._lastParsedTransform = vars;
|
1567
1609
|
var m1 = cssp._transform = _getTransform(t, _cs, true, vars.parseTransform),
|
@@ -1650,15 +1692,15 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1650
1692
|
}
|
1651
1693
|
|
1652
1694
|
orig = v.transformOrigin;
|
1653
|
-
if (
|
1654
|
-
_parseSVGOrigin(t, _parsePosition(orig), m2);
|
1695
|
+
if (m1.svg && (orig || v.svgOrigin)) {
|
1696
|
+
_parseSVGOrigin(t, _parsePosition(orig), m2, v.svgOrigin);
|
1655
1697
|
pt = new CSSPropTween(m1, "xOrigin", m1.xOrigin, m2.xOrigin - m1.xOrigin, pt, -1, "transformOrigin");
|
1656
1698
|
pt.b = m1.xOrigin;
|
1657
1699
|
pt.e = pt.xs0 = m2.xOrigin;
|
1658
1700
|
pt = new CSSPropTween(m1, "yOrigin", m1.yOrigin, m2.yOrigin - m1.yOrigin, pt, -1, "transformOrigin");
|
1659
1701
|
pt.b = m1.yOrigin;
|
1660
1702
|
pt.e = pt.xs0 = m2.yOrigin;
|
1661
|
-
orig = "0px 0px"; //certain browsers (like firefox) completely botch transform-origin, so we must remove it to prevent it from contaminating transforms. We manage it ourselves with xOrigin and yOrigin
|
1703
|
+
orig = _useSVGTransformAttr ? null : "0px 0px"; //certain browsers (like firefox) completely botch transform-origin, so we must remove it to prevent it from contaminating transforms. We manage it ourselves with xOrigin and yOrigin
|
1662
1704
|
}
|
1663
1705
|
if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).
|
1664
1706
|
if (_transformProp) {
|
@@ -1876,8 +1918,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1876
1918
|
var _removeProp = function(s, p) {
|
1877
1919
|
if (p) {
|
1878
1920
|
if (s.removeProperty) {
|
1879
|
-
if (p.substr(0,2) === "ms") { //Microsoft browsers don't conform to the standard of
|
1880
|
-
p = "
|
1921
|
+
if (p.substr(0,2) === "ms" || p.substr(0,6) === "webkit") { //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example)
|
1922
|
+
p = "-" + p;
|
1881
1923
|
}
|
1882
1924
|
s.removeProperty(p.replace(_capsExp, "-$1").toLowerCase());
|
1883
1925
|
} else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()"
|
@@ -2065,6 +2107,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2065
2107
|
this._linkCSSP(tpt, null, pt2);
|
2066
2108
|
tpt.setRatio = (threeD && _supports3D) ? _set3DTransformRatio : _transformProp ? _set2DTransformRatio : _setIETransformRatio;
|
2067
2109
|
tpt.data = this._transform || _getTransform(target, _cs, true);
|
2110
|
+
tpt.tween = tween;
|
2068
2111
|
_overwriteProps.pop(); //we don't want to force the overwrite of all "transform" tweens of the target - we only care about individual transform properties like scaleX, rotation, etc. The CSSPropTween constructor automatically adds the property to _overwriteProps which is why we need to pop() here.
|
2069
2112
|
}
|
2070
2113
|
|
@@ -2400,12 +2443,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2400
2443
|
e = [],
|
2401
2444
|
targets = [],
|
2402
2445
|
_reservedProps = TweenLite._internals.reservedProps,
|
2403
|
-
i, difs, p;
|
2446
|
+
i, difs, p, from;
|
2404
2447
|
target = tween._targets || tween.target;
|
2405
2448
|
_getChildStyles(target, b, targets);
|
2406
|
-
tween.render(duration, true);
|
2449
|
+
tween.render(duration, true, true);
|
2407
2450
|
_getChildStyles(target, e);
|
2408
|
-
tween.render(0, true);
|
2451
|
+
tween.render(0, true, true);
|
2409
2452
|
tween._enabled(true);
|
2410
2453
|
i = targets.length;
|
2411
2454
|
while (--i > -1) {
|
@@ -2417,7 +2460,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2417
2460
|
difs[p] = vars[p];
|
2418
2461
|
}
|
2419
2462
|
}
|
2420
|
-
|
2463
|
+
from = {};
|
2464
|
+
for (p in difs) {
|
2465
|
+
from[p] = b[i][p];
|
2466
|
+
}
|
2467
|
+
results.push(TweenLite.fromTo(targets[i], duration, from, difs));
|
2421
2468
|
}
|
2422
2469
|
}
|
2423
2470
|
return results;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: beta 1.
|
3
|
-
* DATE:
|
4
|
-
* UPDATES AND DOCS AT: http://
|
2
|
+
* VERSION: beta 1.3.0
|
3
|
+
* DATE: 2015-02-06
|
4
|
+
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
|
7
7
|
* This work is subject to the terms at http://greensock.com/standard-license or for
|
@@ -76,7 +76,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
76
76
|
|
77
77
|
_gsScope._gsDefine.plugin({
|
78
78
|
propName: "colorProps",
|
79
|
-
version: "1.
|
79
|
+
version: "1.3.0",
|
80
80
|
priority: -1,
|
81
81
|
API: 2,
|
82
82
|
|
@@ -84,22 +84,25 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
84
84
|
init: function(target, value, tween) {
|
85
85
|
this._target = target;
|
86
86
|
var p, s, c, pt;
|
87
|
+
this.numFormat = (value.format === "number");
|
87
88
|
for (p in value) {
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
pt.
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
pt._next
|
89
|
+
if (p !== "format") {
|
90
|
+
c = _parseColor(value[p]);
|
91
|
+
this._firstPT = pt = {_next:this._firstPT, p:p, f:(typeof(target[p]) === "function"), n:p, r:false};
|
92
|
+
s = _parseColor( (!pt.f) ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]() );
|
93
|
+
pt.s = Number(s[0]);
|
94
|
+
pt.c = Number(c[0]) - pt.s;
|
95
|
+
pt.gs = Number(s[1]);
|
96
|
+
pt.gc = Number(c[1]) - pt.gs;
|
97
|
+
pt.bs = Number(s[2]);
|
98
|
+
pt.bc = Number(c[2]) - pt.bs;
|
99
|
+
if ((pt.rgba = (s.length > 3 || c.length > 3))) { //detect an rgba() value
|
100
|
+
pt.as = (s.length < 4) ? 1 : Number(s[3]);
|
101
|
+
pt.ac = ((c.length < 4) ? 1 : Number(c[3])) - pt.as;
|
102
|
+
}
|
103
|
+
if (pt._next) {
|
104
|
+
pt._next._prev = pt;
|
105
|
+
}
|
103
106
|
}
|
104
107
|
}
|
105
108
|
return true;
|
@@ -109,7 +112,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
109
112
|
set: function(v) {
|
110
113
|
var pt = this._firstPT, val;
|
111
114
|
while (pt) {
|
112
|
-
val = (pt.rgba ? "rgba(" : "rgb(") + ((pt.s + (v * pt.c)) >> 0) + ", " + ((pt.gs + (v * pt.gc)) >> 0) + ", " + ((pt.bs + (v * pt.bc)) >> 0) + (pt.rgba ? ", " + (pt.as + (v * pt.ac)) : "") + ")";
|
115
|
+
val = this.numFormat ? (pt.s + (v * pt.c)) << 16 | (pt.gs + (v * pt.gc)) << 8 | (pt.bs + (v * pt.bc)) : (pt.rgba ? "rgba(" : "rgb(") + ((pt.s + (v * pt.c)) >> 0) + ", " + ((pt.gs + (v * pt.gc)) >> 0) + ", " + ((pt.bs + (v * pt.bc)) >> 0) + (pt.rgba ? ", " + (pt.as + (v * pt.ac)) : "") + ")";
|
113
116
|
if (pt.f) {
|
114
117
|
this._target[pt.p](val);
|
115
118
|
} else {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.7.
|
3
|
-
* DATE:
|
4
|
-
* UPDATES AND DOCS AT: http://
|
2
|
+
* VERSION: 1.7.5
|
3
|
+
* DATE: 2015-02-26
|
4
|
+
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
|
7
7
|
* This work is subject to the terms at http://greensock.com/standard-license or for
|
@@ -21,13 +21,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
21
21
|
scroll = "scroll" + dim,
|
22
22
|
client = "client" + dim,
|
23
23
|
body = document.body;
|
24
|
-
return (element === _window || element === _doc || element === body) ? Math.max(_doc[scroll], body[scroll]) - (_window["inner" + dim] ||
|
24
|
+
return (element === _window || element === _doc || element === body) ? Math.max(_doc[scroll], body[scroll]) - (_window["inner" + dim] || _doc[client] || body[client]) : element[scroll] - element["offset" + dim];
|
25
25
|
},
|
26
26
|
|
27
27
|
ScrollToPlugin = _gsScope._gsDefine.plugin({
|
28
28
|
propName: "scrollTo",
|
29
29
|
API: 2,
|
30
|
-
version:"1.7.
|
30
|
+
version:"1.7.5",
|
31
31
|
|
32
32
|
//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
|
33
33
|
init: function(target, value, tween) {
|