greensock-rails 1.19.1.2 → 1.20.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 +16 -11
- data/vendor/assets/javascripts/greensock/TimelineMax.js +19 -14
- data/vendor/assets/javascripts/greensock/TweenLite.js +27 -18
- data/vendor/assets/javascripts/greensock/TweenMax.js +162 -94
- data/vendor/assets/javascripts/greensock/easing/EasePack.js +11 -10
- data/vendor/assets/javascripts/greensock/plugins/AttrPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/BezierPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/CSSPlugin.js +95 -54
- data/vendor/assets/javascripts/greensock/plugins/CSSRulePlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js +12 -9
- data/vendor/assets/javascripts/greensock/plugins/DirectionalRotationPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/EaselPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/ModifiersPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/PixiPlugin.js +442 -0
- data/vendor/assets/javascripts/greensock/plugins/ScrollToPlugin.js +9 -13
- data/vendor/assets/javascripts/greensock/plugins/TextPlugin.js +37 -8
- data/vendor/assets/javascripts/greensock/utils/Draggable.js +47 -20
- metadata +8 -7
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.15.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 1.15.6
|
3
|
+
* DATE: 2017-06-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -112,10 +112,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
112
112
|
|
113
113
|
|
114
114
|
//SteppedEase
|
115
|
-
SteppedEase = _class("easing.SteppedEase", function(steps) {
|
115
|
+
SteppedEase = _class("easing.SteppedEase", function(steps, immediateStart) {
|
116
116
|
steps = steps || 1;
|
117
117
|
this._p1 = 1 / steps;
|
118
|
-
this._p2 = steps + 1;
|
118
|
+
this._p2 = steps + (immediateStart ? 0 : 1);
|
119
|
+
this._p3 = immediateStart ? 1 : 0;
|
119
120
|
}, true);
|
120
121
|
p = SteppedEase.prototype = new Ease();
|
121
122
|
p.constructor = SteppedEase;
|
@@ -125,10 +126,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
125
126
|
} else if (p >= 1) {
|
126
127
|
p = 0.999999999;
|
127
128
|
}
|
128
|
-
return ((this._p2 * p)
|
129
|
+
return (((this._p2 * p) | 0) + this._p3) * this._p1;
|
129
130
|
};
|
130
|
-
p.config = SteppedEase.config = function(steps) {
|
131
|
-
return new SteppedEase(steps);
|
131
|
+
p.config = SteppedEase.config = function(steps, immediateStart) {
|
132
|
+
return new SteppedEase(steps, immediateStart);
|
132
133
|
};
|
133
134
|
|
134
135
|
|
@@ -350,10 +351,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
350
351
|
var getGlobal = function() {
|
351
352
|
return (_gsScope.GreenSockGlobals || _gsScope);
|
352
353
|
};
|
353
|
-
if (typeof(
|
354
|
-
define(["TweenLite"], getGlobal);
|
355
|
-
} else if (typeof(module) !== "undefined" && module.exports) { //node
|
354
|
+
if (typeof(module) !== "undefined" && module.exports) { //node
|
356
355
|
require("../TweenLite.js");
|
357
356
|
module.exports = getGlobal();
|
357
|
+
} else if (typeof(define) === "function" && define.amd) { //AMD
|
358
|
+
define(["TweenLite"], getGlobal);
|
358
359
|
}
|
359
360
|
}());
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 0.6.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 0.6.1
|
3
|
+
* DATE: 2017-06-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -17,7 +17,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
17
17
|
_gsScope._gsDefine.plugin({
|
18
18
|
propName: "attr",
|
19
19
|
API: 2,
|
20
|
-
version: "0.6.
|
20
|
+
version: "0.6.1",
|
21
21
|
|
22
22
|
//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
|
23
23
|
init: function(target, value, tween, index) {
|
@@ -46,10 +46,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
46
46
|
var getGlobal = function() {
|
47
47
|
return (_gsScope.GreenSockGlobals || _gsScope)[name];
|
48
48
|
};
|
49
|
-
if (typeof(
|
50
|
-
define(["TweenLite"], getGlobal);
|
51
|
-
} else if (typeof(module) !== "undefined" && module.exports) { //node
|
49
|
+
if (typeof(module) !== "undefined" && module.exports) { //node
|
52
50
|
require("../TweenLite.js");
|
53
51
|
module.exports = getGlobal();
|
52
|
+
} else if (typeof(define) === "function" && define.amd) { //AMD
|
53
|
+
define(["TweenLite"], getGlobal);
|
54
54
|
}
|
55
55
|
}("AttrPlugin"));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.3.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 1.3.8
|
3
|
+
* DATE: 2017-06-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -314,7 +314,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
314
314
|
BezierPlugin = _gsScope._gsDefine.plugin({
|
315
315
|
propName: "bezier",
|
316
316
|
priority: -1,
|
317
|
-
version: "1.3.
|
317
|
+
version: "1.3.8",
|
318
318
|
API: 2,
|
319
319
|
global:true,
|
320
320
|
|
@@ -611,10 +611,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
611
611
|
var getGlobal = function() {
|
612
612
|
return (_gsScope.GreenSockGlobals || _gsScope)[name];
|
613
613
|
};
|
614
|
-
if (typeof(
|
615
|
-
define(["TweenLite"], getGlobal);
|
616
|
-
} else if (typeof(module) !== "undefined" && module.exports) { //node
|
614
|
+
if (typeof(module) !== "undefined" && module.exports) { //node
|
617
615
|
require("../TweenLite.js");
|
618
616
|
module.exports = getGlobal();
|
617
|
+
} else if (typeof(define) === "function" && define.amd) { //AMD
|
618
|
+
define(["TweenLite"], getGlobal);
|
619
619
|
}
|
620
620
|
}("BezierPlugin"));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 1.20.0
|
3
|
+
* DATE: 2017-06-13
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, 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.20.0";
|
35
35
|
CSSPlugin.API = 2;
|
36
36
|
CSSPlugin.defaultTransformPerspective = 0;
|
37
37
|
CSSPlugin.defaultSkewType = "compensated";
|
@@ -164,7 +164,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
164
164
|
* @return {number} value in pixels
|
165
165
|
*/
|
166
166
|
_convertToPixels = _internals.convertToPixels = function(t, p, v, sfx, recurse) {
|
167
|
-
if (sfx === "px" || !sfx) { return v; }
|
167
|
+
if (sfx === "px" || (!sfx && p !== "lineHeight")) { return v; }
|
168
168
|
if (sfx === "auto" || !v) { return 0; }
|
169
169
|
var horiz = _horizExp.test(p),
|
170
170
|
node = t,
|
@@ -178,12 +178,20 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
178
178
|
if (precise) {
|
179
179
|
v *= 100;
|
180
180
|
}
|
181
|
-
if (
|
181
|
+
if (p === "lineHeight" && !sfx) { //special case of when a simple lineHeight (without a unit) is used. Set it to the value, read back the computed value, and then revert.
|
182
|
+
cache = _getComputedStyle(t).lineHeight;
|
183
|
+
t.style.lineHeight = v;
|
184
|
+
pix = parseFloat(_getComputedStyle(t).lineHeight);
|
185
|
+
t.style.lineHeight = cache;
|
186
|
+
} else if (sfx === "%" && p.indexOf("border") !== -1) {
|
182
187
|
pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight);
|
183
188
|
} else {
|
184
189
|
style.cssText = "border:0 solid red;position:" + _getStyle(t, "position") + ";line-height:0;";
|
185
190
|
if (sfx === "%" || !node.appendChild || sfx.charAt(0) === "v" || sfx === "rem") {
|
186
191
|
node = t.parentNode || _doc.body;
|
192
|
+
if (_getStyle(node, "display").indexOf("flex") !== -1) { //Edge and IE11 have a bug that causes offsetWidth to report as 0 if the container has display:flex and the child is position:relative. Switching to position: absolute solves it.
|
193
|
+
style.position = "absolute";
|
194
|
+
}
|
187
195
|
cache = node._gsCache;
|
188
196
|
time = TweenLite.ticker.frame;
|
189
197
|
if (cache && horiz && cache.time === time) { //performance optimization: we record the width of elements along with the ticker frame so that we can quickly get it again on the same tick (seems relatively safe to assume it wouldn't change on the same tick)
|
@@ -532,8 +540,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
532
540
|
_formatColors = function(s, toHSL) {
|
533
541
|
var colors = s.match(_colorExp) || [],
|
534
542
|
charIndex = 0,
|
535
|
-
parsed =
|
543
|
+
parsed = "",
|
536
544
|
i, color, temp;
|
545
|
+
if (!colors.length) {
|
546
|
+
return s;
|
547
|
+
}
|
537
548
|
for (i = 0; i < colors.length; i++) {
|
538
549
|
color = colors[i];
|
539
550
|
temp = s.substr(charIndex, s.indexOf(color, charIndex)-charIndex);
|
@@ -554,7 +565,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
554
565
|
_colorExp = new RegExp(_colorExp+")", "gi");
|
555
566
|
|
556
567
|
CSSPlugin.colorStringFilter = function(a) {
|
557
|
-
var combined = a[0] + a[1],
|
568
|
+
var combined = a[0] + " " + a[1],
|
558
569
|
toHSL;
|
559
570
|
if (_colorExp.test(combined)) {
|
560
571
|
toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1);
|
@@ -894,6 +905,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
894
905
|
str = ev.indexOf(")") + 1;
|
895
906
|
str = ")" + (str ? ev.substr(str) : ""); //if there's a comma or ) at the end, retain it.
|
896
907
|
useHSL = (ev.indexOf("hsl") !== -1 && _supportsOpacity);
|
908
|
+
temp = ev; //original string value so we can look for any prefix later.
|
897
909
|
bv = _parseColor(bv, useHSL);
|
898
910
|
ev = _parseColor(ev, useHSL);
|
899
911
|
hasAlpha = (bv.length + ev.length > 6);
|
@@ -905,11 +917,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
905
917
|
hasAlpha = false;
|
906
918
|
}
|
907
919
|
if (useHSL) {
|
908
|
-
pt.appendXtra((hasAlpha ? "hsla(" : "hsl("), bv[0], _parseChange(ev[0], bv[0]), ",", false, true)
|
920
|
+
pt.appendXtra(temp.substr(0, temp.indexOf("hsl")) + (hasAlpha ? "hsla(" : "hsl("), bv[0], _parseChange(ev[0], bv[0]), ",", false, true)
|
909
921
|
.appendXtra("", bv[1], _parseChange(ev[1], bv[1]), "%,", false)
|
910
922
|
.appendXtra("", bv[2], _parseChange(ev[2], bv[2]), (hasAlpha ? "%," : "%" + str), false);
|
911
923
|
} else {
|
912
|
-
pt.appendXtra((hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", true, true)
|
924
|
+
pt.appendXtra(temp.substr(0, temp.indexOf("rgb")) + (hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", true, true)
|
913
925
|
.appendXtra("", bv[1], ev[1] - bv[1], ",", true)
|
914
926
|
.appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), true);
|
915
927
|
}
|
@@ -1327,8 +1339,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1327
1339
|
s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";
|
1328
1340
|
}
|
1329
1341
|
isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
|
1330
|
-
if (
|
1331
|
-
if (none) { //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none".
|
1342
|
+
if (_transformProp && ((none = (_getComputedStyle(e).display === "none")) || !e.parentNode)) {
|
1343
|
+
if (none) { //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
|
1332
1344
|
n = style.display;
|
1333
1345
|
style.display = "block";
|
1334
1346
|
}
|
@@ -1413,7 +1425,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1413
1425
|
a43 = m[11],
|
1414
1426
|
angle = Math.atan2(a32, a33),
|
1415
1427
|
t1, t2, t3, t4, cos, sin;
|
1416
|
-
|
1417
1428
|
//we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari
|
1418
1429
|
if (tm.zOrigin) {
|
1419
1430
|
a34 = -tm.zOrigin;
|
@@ -1421,6 +1432,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1421
1432
|
a24 = a23*a34-m[13];
|
1422
1433
|
a34 = a33*a34+tm.zOrigin-m[14];
|
1423
1434
|
}
|
1435
|
+
//note for possible future consolidation: rotationX: Math.atan2(a32, a33), rotationY: Math.atan2(-a31, Math.sqrt(a33 * a33 + a32 * a32)), rotation: Math.atan2(a21, a11), skew: Math.atan2(a12, a22). However, it doesn't seem to be quite as reliable as the full-on backwards rotation procedure.
|
1424
1436
|
tm.rotationX = angle * _RAD2DEG;
|
1425
1437
|
//rotationX
|
1426
1438
|
if (angle) {
|
@@ -1457,13 +1469,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1457
1469
|
angle = Math.atan2(a21, a11);
|
1458
1470
|
tm.rotation = angle * _RAD2DEG;
|
1459
1471
|
if (angle) {
|
1460
|
-
cos = Math.cos(
|
1461
|
-
sin = Math.sin(
|
1462
|
-
|
1463
|
-
t2 =
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1472
|
+
cos = Math.cos(angle);
|
1473
|
+
sin = Math.sin(angle);
|
1474
|
+
t1 = a11*cos+a21*sin;
|
1475
|
+
t2 = a12*cos+a22*sin;
|
1476
|
+
t3 = a13*cos+a23*sin;
|
1477
|
+
a21 = a21*cos-a11*sin;
|
1478
|
+
a22 = a22*cos-a12*sin;
|
1479
|
+
a23 = a23*cos-a13*sin;
|
1480
|
+
a11 = t1;
|
1481
|
+
a12 = t2;
|
1482
|
+
a13 = t3;
|
1467
1483
|
}
|
1468
1484
|
|
1469
1485
|
if (tm.rotationX && Math.abs(tm.rotationX) + Math.abs(tm.rotation) > 359.9) { //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.
|
@@ -1471,24 +1487,46 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1471
1487
|
tm.rotationY = 180 - tm.rotationY;
|
1472
1488
|
}
|
1473
1489
|
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
+
//skewX
|
1491
|
+
angle = Math.atan2(a12, a22);
|
1492
|
+
|
1493
|
+
//scales
|
1494
|
+
tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21 + a31 * a31) * rnd + 0.5) | 0) / rnd;
|
1495
|
+
tm.scaleY = ((Math.sqrt(a22 * a22 + a32 * a32) * rnd + 0.5) | 0) / rnd;
|
1496
|
+
tm.scaleZ = ((Math.sqrt(a13 * a13 + a23 * a23 + a33 * a33) * rnd + 0.5) | 0) / rnd;
|
1497
|
+
a11 /= tm.scaleX;
|
1498
|
+
a12 /= tm.scaleY;
|
1499
|
+
a21 /= tm.scaleX;
|
1500
|
+
a22 /= tm.scaleY;
|
1501
|
+
if (Math.abs(angle) > min) {
|
1502
|
+
tm.skewX = angle * _RAD2DEG;
|
1503
|
+
a12 = 0; //unskews
|
1504
|
+
if (tm.skewType !== "simple") {
|
1505
|
+
tm.scaleY *= 1 / Math.cos(angle); //by default, we compensate the scale based on the skew so that the element maintains a similar proportion when skewed, so we have to alter the scaleY here accordingly to match the default (non-adjusted) skewing that CSS does (stretching more and more as it skews).
|
1490
1506
|
}
|
1507
|
+
|
1508
|
+
} else {
|
1509
|
+
tm.skewX = 0;
|
1491
1510
|
}
|
1511
|
+
|
1512
|
+
/* //for testing purposes
|
1513
|
+
var transform = "matrix3d(",
|
1514
|
+
comma = ",",
|
1515
|
+
zero = "0";
|
1516
|
+
a13 /= tm.scaleZ;
|
1517
|
+
a23 /= tm.scaleZ;
|
1518
|
+
a31 /= tm.scaleX;
|
1519
|
+
a32 /= tm.scaleY;
|
1520
|
+
a33 /= tm.scaleZ;
|
1521
|
+
transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31);
|
1522
|
+
transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22);
|
1523
|
+
transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13);
|
1524
|
+
transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma;
|
1525
|
+
transform += a14 + comma + a24 + comma + a34 + comma + (tm.perspective ? (1 + (-a34 / tm.perspective)) : 1) + ")";
|
1526
|
+
console.log(transform);
|
1527
|
+
document.querySelector(".test").style[_transformProp] = transform;
|
1528
|
+
*/
|
1529
|
+
|
1492
1530
|
tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0;
|
1493
1531
|
tm.x = a14;
|
1494
1532
|
tm.y = a24;
|
@@ -1510,16 +1548,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1510
1548
|
scaleY = Math.sqrt(d * d + c * c);
|
1511
1549
|
rotation = (a || b) ? Math.atan2(b, a) * _RAD2DEG : tm.rotation || 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).
|
1512
1550
|
skewX = (c || d) ? Math.atan2(c, d) * _RAD2DEG + rotation : tm.skewX || 0;
|
1513
|
-
if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) {
|
1514
|
-
if (invX) {
|
1515
|
-
scaleX *= -1;
|
1516
|
-
skewX += (rotation <= 0) ? 180 : -180;
|
1517
|
-
rotation += (rotation <= 0) ? 180 : -180;
|
1518
|
-
} else {
|
1519
|
-
scaleY *= -1;
|
1520
|
-
skewX += (skewX <= 0) ? 180 : -180;
|
1521
|
-
}
|
1522
|
-
}
|
1523
1551
|
tm.scaleX = scaleX;
|
1524
1552
|
tm.scaleY = scaleY;
|
1525
1553
|
tm.rotation = rotation;
|
@@ -1534,6 +1562,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1534
1562
|
tm.y -= tm.yOrigin - (tm.xOrigin * b + tm.yOrigin * d);
|
1535
1563
|
}
|
1536
1564
|
}
|
1565
|
+
if (Math.abs(tm.skewX) > 90 && Math.abs(tm.skewX) < 270) {
|
1566
|
+
if (invX) {
|
1567
|
+
tm.scaleX *= -1;
|
1568
|
+
tm.skewX += (tm.rotation <= 0) ? 180 : -180;
|
1569
|
+
tm.rotation += (tm.rotation <= 0) ? 180 : -180;
|
1570
|
+
} else {
|
1571
|
+
tm.scaleY *= -1;
|
1572
|
+
tm.skewX += (tm.skewX <= 0) ? 180 : -180;
|
1573
|
+
}
|
1574
|
+
}
|
1537
1575
|
tm.zOrigin = zOrigin;
|
1538
1576
|
//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.
|
1539
1577
|
for (i in tm) {
|
@@ -1767,7 +1805,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1767
1805
|
a11 = a22 = 1;
|
1768
1806
|
a12 = a21 = 0;
|
1769
1807
|
}
|
1770
|
-
// KEY INDEX AFFECTS
|
1808
|
+
// KEY INDEX AFFECTS a[row][column]
|
1771
1809
|
// a11 0 rotation, rotationY, scaleX
|
1772
1810
|
// a21 1 rotation, rotationY, scaleX
|
1773
1811
|
// a31 2 rotationY, scaleX
|
@@ -1903,6 +1941,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1903
1941
|
m1 = _getTransform(t, _cs, true, v.parseTransform),
|
1904
1942
|
orig = v.transform && ((typeof(v.transform) === "function") ? v.transform(_index, _target) : v.transform),
|
1905
1943
|
m2, copy, has3D, hasChange, dr, x, y, matrix, p;
|
1944
|
+
m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType;
|
1906
1945
|
cssp._transform = m1;
|
1907
1946
|
if (orig && typeof(orig) === "string" && _transformProp) { //for values like transform:"rotate(60deg) scale(0.5, 0.8)"
|
1908
1947
|
copy = _tempDiv.style; //don't use the original target because it might be SVG in which case some browsers don't report computed style correctly.
|
@@ -1911,6 +1950,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1911
1950
|
copy.position = "absolute";
|
1912
1951
|
_doc.body.appendChild(_tempDiv);
|
1913
1952
|
m2 = _getTransform(_tempDiv, null, false);
|
1953
|
+
if (m1.skewType === "simple") { //the default _getTransform() reports the skewX/scaleY as if skewType is "compensated", thus we need to adjust that here if skewType is "simple".
|
1954
|
+
m2.scaleY *= Math.cos(m2.skewX * _DEG2RAD);
|
1955
|
+
}
|
1914
1956
|
if (m1.svg) { //if it's an SVG element, x/y part of the matrix will be affected by whatever we use as the origin and the offsets, so compensate here...
|
1915
1957
|
x = m1.xOrigin;
|
1916
1958
|
y = m1.yOrigin;
|
@@ -1982,8 +2024,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1982
2024
|
hasChange = true;
|
1983
2025
|
}
|
1984
2026
|
|
1985
|
-
m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType;
|
1986
|
-
|
1987
2027
|
has3D = (m1.force3D || m1.z || m1.rotationX || m1.rotationY || m2.z || m2.rotationX || m2.rotationY || m2.perspective);
|
1988
2028
|
if (!has3D && v.scale != null) {
|
1989
2029
|
m2.scaleZ = 1; //no need to tween scaleZ.
|
@@ -2491,7 +2531,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2491
2531
|
sp = _specialProps[p]; //SpecialProp lookup.
|
2492
2532
|
if (sp) {
|
2493
2533
|
pt = sp.parse(target, es, p, this, pt, plugin, vars);
|
2494
|
-
|
2534
|
+
} else if (p.substr(0,2) === "--") { //for tweening CSS variables (which always start with "--"). To maximize performance and simplicity, we bypass CSSPlugin altogether and just add a normal property tween to the tween instance itself.
|
2535
|
+
this._tween._propLookup[p] = this._addTween.call(this._tween, target.style, "setProperty", _getComputedStyle(target).getPropertyValue(p) + "", es + "", p, false, p);
|
2536
|
+
continue;
|
2495
2537
|
} else {
|
2496
2538
|
bs = _getStyle(target, p, _cs) + "";
|
2497
2539
|
isStr = (typeof(es) === "string");
|
@@ -2538,9 +2580,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2538
2580
|
}
|
2539
2581
|
|
2540
2582
|
es = (en || en === 0) ? (rel ? en + bn : en) + esfx : vars[p]; //ensures that any += or -= prefixes are taken care of. Record the end value before normalizing the suffix because we always want to end the tween on exactly what they intended even if it doesn't match the beginning value's suffix.
|
2541
|
-
|
2542
2583
|
//if the beginning/ending suffixes don't match, normalize them...
|
2543
|
-
if (bsfx !== esfx) if (esfx !== "") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units!
|
2584
|
+
if (bsfx !== esfx) if (esfx !== "" || p === "lineHeight") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units!
|
2544
2585
|
bn = _convertToPixels(target, p, bn, bsfx);
|
2545
2586
|
if (esfx === "%") {
|
2546
2587
|
bn /= _convertToPixels(target, p, 100, "%") / 100;
|
@@ -2861,10 +2902,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2861
2902
|
var getGlobal = function() {
|
2862
2903
|
return (_gsScope.GreenSockGlobals || _gsScope)[name];
|
2863
2904
|
};
|
2864
|
-
if (typeof(
|
2865
|
-
define(["TweenLite"], getGlobal);
|
2866
|
-
} else if (typeof(module) !== "undefined" && module.exports) { //node
|
2905
|
+
if (typeof(module) !== "undefined" && module.exports) { //node
|
2867
2906
|
require("../TweenLite.js");
|
2868
2907
|
module.exports = getGlobal();
|
2908
|
+
} else if (typeof(define) === "function" && define.amd) { //AMD
|
2909
|
+
define(["TweenLite"], getGlobal);
|
2869
2910
|
}
|
2870
2911
|
}("CSSPlugin"));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 0.6.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 0.6.5
|
3
|
+
* DATE: 2017-06-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -27,7 +27,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
27
27
|
|
28
28
|
p._propName = "cssRule";
|
29
29
|
p.constructor = CSSRulePlugin;
|
30
|
-
CSSRulePlugin.version = "0.6.
|
30
|
+
CSSRulePlugin.version = "0.6.5";
|
31
31
|
CSSRulePlugin.API = 2;
|
32
32
|
|
33
33
|
/**
|
@@ -110,10 +110,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
110
110
|
var getGlobal = function() {
|
111
111
|
return (_gsScope.GreenSockGlobals || _gsScope)[name];
|
112
112
|
};
|
113
|
-
if (typeof(
|
114
|
-
define(["TweenLite"], getGlobal);
|
115
|
-
} else if (typeof(module) !== "undefined" && module.exports) { //node
|
113
|
+
if (typeof(module) !== "undefined" && module.exports) { //node
|
116
114
|
require("../TweenLite.js");
|
117
115
|
module.exports = getGlobal();
|
116
|
+
} else if (typeof(define) === "function" && define.amd) { //AMD
|
117
|
+
define(["TweenLite"], getGlobal);
|
118
118
|
}
|
119
119
|
}("CSSRulePlugin"));
|