greensock-rails 1.16.0.0 → 1.16.1.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 +9 -7
- data/vendor/assets/javascripts/greensock/TimelineMax.js +11 -8
- data/vendor/assets/javascripts/greensock/TweenLite.js +5 -4
- data/vendor/assets/javascripts/greensock/TweenMax.js +107 -92
- data/vendor/assets/javascripts/greensock/jquery.gsap.js +4 -4
- data/vendor/assets/javascripts/greensock/plugins/CSSPlugin.js +92 -81
- data/vendor/assets/javascripts/greensock/utils/Draggable.js +92 -58
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 266339413f3b2f290f31305f05706e4ca9b9bc8b
|
4
|
+
data.tar.gz: b076b7b1437577c07f7d708f1b6996228d22cf96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 332c7ff986a3eb9253c5a233f76a2eed8a9535066807a1db2e9a15e386be3bd29465137bfc17339afd0e329f26aee7b9ad897660a8a26fd21160091f73d5a347
|
7
|
+
data.tar.gz: 08aefec60fc0c4ad62189de436225202f8d7323f479e40aa2aa3b31a19427a1e5c148234dbba80f69baa2ed58acd4612fb361be01c6acac69363f0086f9d3b54
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.16.
|
3
|
-
* DATE: 2015-03-
|
2
|
+
* VERSION: 1.16.1
|
3
|
+
* DATE: 2015-03-13
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
|
@@ -55,8 +55,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
55
55
|
var tl = tween._timeline,
|
56
56
|
time = tl._totalTime,
|
57
57
|
startTime = tween._startTime,
|
58
|
-
|
59
|
-
|
58
|
+
reversed = (tween._rawPrevTime < 0 || (tween._rawPrevTime === 0 && tl._reversed)),//don't use tween.ratio because if the playhead lands exactly on top of the addPause(), ratio will be 1 even if the master timeline was reversed (which is correct). The key here is to sense the direction of the playhead.
|
59
|
+
next = reversed ? 0 : _tinyNum,
|
60
|
+
prev = reversed ? _tinyNum : 0,
|
60
61
|
sibling;
|
61
62
|
if (callback || !this._forcingPlayhead) { //if the user calls a method that moves the playhead (like progress() or time()), it should honor that and skip any pauses (although if there's a callback positioned at that pause, it must jump there and make the call to ensure the time is EXACTLY what it is supposed to be, and then proceed to where the playhead is being forced). Otherwise, imagine placing a pause in the middle of a timeline and then doing timeline.progress(0.9) - it would get stuck where the pause is.
|
62
63
|
tl.pause(startTime);
|
@@ -74,7 +75,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
74
75
|
if (callback) {
|
75
76
|
callback.apply(scope || tl, params || _blankArray);
|
76
77
|
}
|
77
|
-
if (this._forcingPlayhead) {
|
78
|
+
if (this._forcingPlayhead || !tl._paused) { //the callback could have called resume().
|
78
79
|
tl.seek(time);
|
79
80
|
}
|
80
81
|
}
|
@@ -88,7 +89,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
88
89
|
},
|
89
90
|
p = TimelineLite.prototype = new SimpleTimeline();
|
90
91
|
|
91
|
-
TimelineLite.version = "1.16.
|
92
|
+
TimelineLite.version = "1.16.1";
|
92
93
|
p.constructor = TimelineLite;
|
93
94
|
p.kill()._gc = p._forcingPlayhead = false;
|
94
95
|
|
@@ -381,6 +382,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
381
382
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
382
383
|
isComplete = true;
|
383
384
|
callback = "onComplete";
|
385
|
+
internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
|
384
386
|
if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
|
385
387
|
internalForce = true;
|
386
388
|
if (this._rawPrevTime > _tinyNum) {
|
@@ -705,7 +707,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
705
707
|
time = this._time;
|
706
708
|
while (tween) {
|
707
709
|
if (tween._startTime === time && tween.data === "isPause") {
|
708
|
-
tween._rawPrevTime =
|
710
|
+
tween._rawPrevTime = 0; //remember, _rawPrevTime is how zero-duration tweens/callbacks sense directionality and determine whether or not to fire. If _rawPrevTime is the same as _startTime on the next render, it won't fire.
|
709
711
|
}
|
710
712
|
tween = tween._next;
|
711
713
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.16.
|
3
|
-
* DATE: 2015-03-
|
2
|
+
* VERSION: 1.16.1
|
3
|
+
* DATE: 2015-03-13
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
|
@@ -34,7 +34,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
34
34
|
|
35
35
|
p.constructor = TimelineMax;
|
36
36
|
p.kill()._gc = false;
|
37
|
-
TimelineMax.version = "1.16.
|
37
|
+
TimelineMax.version = "1.16.1";
|
38
38
|
|
39
39
|
p.invalidate = function() {
|
40
40
|
this._yoyo = (this.vars.yoyo === true);
|
@@ -123,6 +123,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
123
123
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
124
124
|
isComplete = true;
|
125
125
|
callback = "onComplete";
|
126
|
+
internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
|
126
127
|
if (this._duration === 0) if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {
|
127
128
|
internalForce = true;
|
128
129
|
if (prevRawPrevTime > _tinyNum) {
|
@@ -518,8 +519,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
518
519
|
var tl = tween._timeline,
|
519
520
|
time = tl._totalTime,
|
520
521
|
startTime = tween._startTime,
|
521
|
-
|
522
|
-
|
522
|
+
reversed = (tween._rawPrevTime < 0 || (tween._rawPrevTime === 0 && tl._reversed)),//don't use tween.ratio because if the playhead lands exactly on top of the addPause(), ratio will be 1 even if the master timeline was reversed (which is correct). The key here is to sense the direction of the playhead.
|
523
|
+
next = reversed ? 0 : _tinyNum,
|
524
|
+
prev = reversed ? _tinyNum : 0,
|
523
525
|
sibling;
|
524
526
|
if (callback || !this._forcingPlayhead) { //if the user calls a method that moves the playhead (like progress() or time()), it should honor that and skip any pauses (although if there's a callback positioned at that pause, it must jump there and make the call to ensure the time is EXACTLY what it is supposed to be, and then proceed to where the playhead is being forced). Otherwise, imagine placing a pause in the middle of a timeline and then doing timeline.progress(0.9) - it would get stuck where the pause is.
|
525
527
|
tl.pause(startTime);
|
@@ -537,7 +539,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
537
539
|
if (callback) {
|
538
540
|
callback.apply(scope || tl, params || _blankArray);
|
539
541
|
}
|
540
|
-
if (this._forcingPlayhead) {
|
542
|
+
if (this._forcingPlayhead || !tl._paused) { //the callback could have called resume().
|
541
543
|
tl.seek(time);
|
542
544
|
}
|
543
545
|
}
|
@@ -551,7 +553,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
551
553
|
},
|
552
554
|
p = TimelineLite.prototype = new SimpleTimeline();
|
553
555
|
|
554
|
-
TimelineLite.version = "1.16.
|
556
|
+
TimelineLite.version = "1.16.1";
|
555
557
|
p.constructor = TimelineLite;
|
556
558
|
p.kill()._gc = p._forcingPlayhead = false;
|
557
559
|
|
@@ -844,6 +846,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
844
846
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
845
847
|
isComplete = true;
|
846
848
|
callback = "onComplete";
|
849
|
+
internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
|
847
850
|
if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
|
848
851
|
internalForce = true;
|
849
852
|
if (this._rawPrevTime > _tinyNum) {
|
@@ -1168,7 +1171,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1168
1171
|
time = this._time;
|
1169
1172
|
while (tween) {
|
1170
1173
|
if (tween._startTime === time && tween.data === "isPause") {
|
1171
|
-
tween._rawPrevTime =
|
1174
|
+
tween._rawPrevTime = 0; //remember, _rawPrevTime is how zero-duration tweens/callbacks sense directionality and determine whether or not to fire. If _rawPrevTime is the same as _startTime on the next render, it won't fire.
|
1172
1175
|
}
|
1173
1176
|
tween = tween._next;
|
1174
1177
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.16.
|
3
|
-
* DATE: 2015-03-
|
2
|
+
* VERSION: 1.16.1
|
3
|
+
* DATE: 2015-03-13
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
|
@@ -375,7 +375,7 @@
|
|
375
375
|
|
376
376
|
//a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition.
|
377
377
|
setTimeout(function() {
|
378
|
-
if (_useRAF &&
|
378
|
+
if (_useRAF && _self.frame < 5) {
|
379
379
|
_self.useRAF(false);
|
380
380
|
}
|
381
381
|
}, 1500);
|
@@ -912,7 +912,7 @@
|
|
912
912
|
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
913
913
|
p._notifyPluginsOfEnabled = p._lazy = false;
|
914
914
|
|
915
|
-
TweenLite.version = "1.16.
|
915
|
+
TweenLite.version = "1.16.1";
|
916
916
|
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
917
917
|
TweenLite.defaultOverwrite = "auto";
|
918
918
|
TweenLite.ticker = _ticker;
|
@@ -1276,6 +1276,7 @@
|
|
1276
1276
|
if (!this._reversed ) {
|
1277
1277
|
isComplete = true;
|
1278
1278
|
callback = "onComplete";
|
1279
|
+
force = (force || this._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
|
1279
1280
|
}
|
1280
1281
|
if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
|
1281
1282
|
if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.16.
|
3
|
-
* DATE: 2015-03-
|
2
|
+
* VERSION: 1.16.1
|
3
|
+
* DATE: 2015-03-13
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
|
@@ -41,7 +41,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
41
41
|
p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
|
42
42
|
_blankArray = [];
|
43
43
|
|
44
|
-
TweenMax.version = "1.16.
|
44
|
+
TweenMax.version = "1.16.1";
|
45
45
|
p.constructor = TweenMax;
|
46
46
|
p.kill()._gc = false;
|
47
47
|
TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
|
@@ -119,7 +119,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
119
119
|
prevCycle = this._cycle,
|
120
120
|
duration = this._duration,
|
121
121
|
prevRawPrevTime = this._rawPrevTime,
|
122
|
-
isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime
|
122
|
+
isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime;
|
123
123
|
if (time >= totalDur) {
|
124
124
|
this._totalTime = totalDur;
|
125
125
|
this._cycle = this._repeat;
|
@@ -133,6 +133,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
133
133
|
if (!this._reversed) {
|
134
134
|
isComplete = true;
|
135
135
|
callback = "onComplete";
|
136
|
+
force = (force || this._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
|
136
137
|
}
|
137
138
|
if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
|
138
139
|
if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
|
@@ -646,8 +647,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
646
647
|
var tl = tween._timeline,
|
647
648
|
time = tl._totalTime,
|
648
649
|
startTime = tween._startTime,
|
649
|
-
|
650
|
-
|
650
|
+
reversed = (tween._rawPrevTime < 0 || (tween._rawPrevTime === 0 && tl._reversed)),//don't use tween.ratio because if the playhead lands exactly on top of the addPause(), ratio will be 1 even if the master timeline was reversed (which is correct). The key here is to sense the direction of the playhead.
|
651
|
+
next = reversed ? 0 : _tinyNum,
|
652
|
+
prev = reversed ? _tinyNum : 0,
|
651
653
|
sibling;
|
652
654
|
if (callback || !this._forcingPlayhead) { //if the user calls a method that moves the playhead (like progress() or time()), it should honor that and skip any pauses (although if there's a callback positioned at that pause, it must jump there and make the call to ensure the time is EXACTLY what it is supposed to be, and then proceed to where the playhead is being forced). Otherwise, imagine placing a pause in the middle of a timeline and then doing timeline.progress(0.9) - it would get stuck where the pause is.
|
653
655
|
tl.pause(startTime);
|
@@ -665,7 +667,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
665
667
|
if (callback) {
|
666
668
|
callback.apply(scope || tl, params || _blankArray);
|
667
669
|
}
|
668
|
-
if (this._forcingPlayhead) {
|
670
|
+
if (this._forcingPlayhead || !tl._paused) { //the callback could have called resume().
|
669
671
|
tl.seek(time);
|
670
672
|
}
|
671
673
|
}
|
@@ -679,7 +681,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
679
681
|
},
|
680
682
|
p = TimelineLite.prototype = new SimpleTimeline();
|
681
683
|
|
682
|
-
TimelineLite.version = "1.16.
|
684
|
+
TimelineLite.version = "1.16.1";
|
683
685
|
p.constructor = TimelineLite;
|
684
686
|
p.kill()._gc = p._forcingPlayhead = false;
|
685
687
|
|
@@ -972,6 +974,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
972
974
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
973
975
|
isComplete = true;
|
974
976
|
callback = "onComplete";
|
977
|
+
internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
|
975
978
|
if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
|
976
979
|
internalForce = true;
|
977
980
|
if (this._rawPrevTime > _tinyNum) {
|
@@ -1296,7 +1299,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1296
1299
|
time = this._time;
|
1297
1300
|
while (tween) {
|
1298
1301
|
if (tween._startTime === time && tween.data === "isPause") {
|
1299
|
-
tween._rawPrevTime =
|
1302
|
+
tween._rawPrevTime = 0; //remember, _rawPrevTime is how zero-duration tweens/callbacks sense directionality and determine whether or not to fire. If _rawPrevTime is the same as _startTime on the next render, it won't fire.
|
1300
1303
|
}
|
1301
1304
|
tween = tween._next;
|
1302
1305
|
}
|
@@ -1357,7 +1360,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1357
1360
|
|
1358
1361
|
p.constructor = TimelineMax;
|
1359
1362
|
p.kill()._gc = false;
|
1360
|
-
TimelineMax.version = "1.16.
|
1363
|
+
TimelineMax.version = "1.16.1";
|
1361
1364
|
|
1362
1365
|
p.invalidate = function() {
|
1363
1366
|
this._yoyo = (this.vars.yoyo === true);
|
@@ -1446,6 +1449,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1446
1449
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
1447
1450
|
isComplete = true;
|
1448
1451
|
callback = "onComplete";
|
1452
|
+
internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
|
1449
1453
|
if (this._duration === 0) if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {
|
1450
1454
|
internalForce = true;
|
1451
1455
|
if (prevRawPrevTime > _tinyNum) {
|
@@ -2408,7 +2412,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2408
2412
|
p = CSSPlugin.prototype = new TweenPlugin("css");
|
2409
2413
|
|
2410
2414
|
p.constructor = CSSPlugin;
|
2411
|
-
CSSPlugin.version = "1.16.
|
2415
|
+
CSSPlugin.version = "1.16.1";
|
2412
2416
|
CSSPlugin.API = 2;
|
2413
2417
|
CSSPlugin.defaultTransformPerspective = 0;
|
2414
2418
|
CSSPlugin.defaultSkewType = "compensated";
|
@@ -2690,6 +2694,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2690
2694
|
if (x === "center" || (isNaN(parseFloat(x)) && (x + "").indexOf("=") === -1)) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it could be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative.
|
2691
2695
|
x = "50%";
|
2692
2696
|
}
|
2697
|
+
v = x + " " + y + ((a.length > 2) ? " " + a[2] : "");
|
2693
2698
|
if (recObj) {
|
2694
2699
|
recObj.oxp = (x.indexOf("%") !== -1);
|
2695
2700
|
recObj.oyp = (y.indexOf("%") !== -1);
|
@@ -2697,8 +2702,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2697
2702
|
recObj.oyr = (y.charAt(1) === "=");
|
2698
2703
|
recObj.ox = parseFloat(x.replace(_NaNExp, ""));
|
2699
2704
|
recObj.oy = parseFloat(y.replace(_NaNExp, ""));
|
2705
|
+
recObj.v = v;
|
2700
2706
|
}
|
2701
|
-
return
|
2707
|
+
return recObj || v;
|
2702
2708
|
},
|
2703
2709
|
|
2704
2710
|
/**
|
@@ -3150,7 +3156,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3150
3156
|
bv = ba[i];
|
3151
3157
|
ev = ea[i];
|
3152
3158
|
bn = parseFloat(bv);
|
3153
|
-
|
3154
3159
|
//if the value begins with a number (most common). It's fine if it has a suffix like px
|
3155
3160
|
if (bn || bn === 0) {
|
3156
3161
|
pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1), true);
|
@@ -3763,26 +3768,73 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3763
3768
|
},
|
3764
3769
|
*/
|
3765
3770
|
|
3766
|
-
|
3771
|
+
_setTransformRatio = _internals.set3DTransformRatio = _internals.setTransformRatio = function(v) {
|
3767
3772
|
var t = this.data, //refers to the element's _gsTransform object
|
3768
3773
|
style = this.t.style,
|
3769
|
-
angle = t.rotation
|
3774
|
+
angle = t.rotation,
|
3775
|
+
rotationX = t.rotationX,
|
3776
|
+
rotationY = t.rotationY,
|
3770
3777
|
sx = t.scaleX,
|
3771
3778
|
sy = t.scaleY,
|
3772
3779
|
sz = t.scaleZ,
|
3773
3780
|
x = t.x,
|
3774
3781
|
y = t.y,
|
3775
3782
|
z = t.z,
|
3783
|
+
isSVG = t.svg,
|
3776
3784
|
perspective = t.perspective,
|
3785
|
+
force3D = t.force3D,
|
3777
3786
|
a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43,
|
3778
|
-
zOrigin, min, cos, sin, t1, t2, transform, comma, zero;
|
3779
|
-
|
3780
|
-
|
3787
|
+
zOrigin, min, cos, sin, t1, t2, transform, comma, zero, skew, rnd;
|
3788
|
+
|
3789
|
+
//check to see if we should render as 2D (and SVGs must use 2D when _useSVGTransformAttr is true)
|
3790
|
+
if (((((v === 1 || v === 0) && force3D === "auto" && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !force3D) && !z && !perspective && !rotationY && !rotationX) || (_useSVGTransformAttr && isSVG) || !_supports3D) { //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.
|
3791
|
+
|
3792
|
+
//2D
|
3793
|
+
if (angle || t.skewX || isSVG) {
|
3794
|
+
angle *= _DEG2RAD;
|
3795
|
+
skew = t.skewX * _DEG2RAD;
|
3796
|
+
rnd = 100000;
|
3797
|
+
a11 = Math.cos(angle) * sx;
|
3798
|
+
a21 = Math.sin(angle) * sx;
|
3799
|
+
a12 = Math.sin(angle - skew) * -sy;
|
3800
|
+
a22 = Math.cos(angle - skew) * sy;
|
3801
|
+
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
|
3802
|
+
t1 = Math.tan(skew);
|
3803
|
+
t1 = Math.sqrt(1 + t1 * t1);
|
3804
|
+
a12 *= t1;
|
3805
|
+
a22 *= t1;
|
3806
|
+
if (t.skewY) {
|
3807
|
+
a11 *= t1;
|
3808
|
+
a21 *= t1;
|
3809
|
+
}
|
3810
|
+
}
|
3811
|
+
if (isSVG) {
|
3812
|
+
x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12);
|
3813
|
+
y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22);
|
3814
|
+
min = 0.000001;
|
3815
|
+
if (x < min) if (x > -min) {
|
3816
|
+
x = 0;
|
3817
|
+
}
|
3818
|
+
if (y < min) if (y > -min) {
|
3819
|
+
y = 0;
|
3820
|
+
}
|
3821
|
+
}
|
3822
|
+
transform = (((a11 * rnd) | 0) / rnd) + "," + (((a21 * rnd) | 0) / rnd) + "," + (((a12 * rnd) | 0) / rnd) + "," + (((a22 * rnd) | 0) / rnd) + "," + x + "," + y + ")";
|
3823
|
+
if (isSVG && _useSVGTransformAttr) {
|
3824
|
+
this.t.setAttribute("transform", "matrix(" + transform);
|
3825
|
+
} else {
|
3826
|
+
//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 5 decimal places.
|
3827
|
+
style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + transform;
|
3828
|
+
}
|
3829
|
+
} else {
|
3830
|
+
style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + sx + ",0,0," + sy + "," + x + "," + y + ")";
|
3831
|
+
}
|
3781
3832
|
return;
|
3833
|
+
|
3782
3834
|
}
|
3783
|
-
if (_isFirefox) {
|
3835
|
+
if (_isFirefox) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue.
|
3784
3836
|
min = 0.0001;
|
3785
|
-
if (sx < min && sx > -min) {
|
3837
|
+
if (sx < min && sx > -min) {
|
3786
3838
|
sx = sz = 0.00002;
|
3787
3839
|
}
|
3788
3840
|
if (sy < min && sy > -min) {
|
@@ -3793,6 +3845,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3793
3845
|
}
|
3794
3846
|
}
|
3795
3847
|
if (angle || t.skewX) {
|
3848
|
+
angle *= _DEG2RAD;
|
3796
3849
|
cos = a11 = Math.cos(angle);
|
3797
3850
|
sin = a21 = Math.sin(angle);
|
3798
3851
|
if (t.skewX) {
|
@@ -3804,12 +3857,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3804
3857
|
t1 = Math.sqrt(1 + t1 * t1);
|
3805
3858
|
cos *= t1;
|
3806
3859
|
sin *= t1;
|
3860
|
+
if (t.skewY) {
|
3861
|
+
a11 *= t1;
|
3862
|
+
a21 *= t1;
|
3863
|
+
}
|
3807
3864
|
}
|
3808
3865
|
}
|
3809
3866
|
a12 = -sin;
|
3810
3867
|
a22 = cos;
|
3811
3868
|
|
3812
|
-
} else if (!
|
3869
|
+
} else if (!rotationY && !rotationX && sz === 1 && !perspective && !isSVG) { //if we're only translating and/or 2D scaling, this is faster...
|
3813
3870
|
style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) translate3d(" : "translate3d(") + x + "px," + y + "px," + z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : "");
|
3814
3871
|
return;
|
3815
3872
|
} else {
|
@@ -3843,7 +3900,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3843
3900
|
min = 0.000001; //threshold below which browsers use scientific notation which won't work.
|
3844
3901
|
comma = ",";
|
3845
3902
|
zero = "0";
|
3846
|
-
angle =
|
3903
|
+
angle = rotationY * _DEG2RAD;
|
3847
3904
|
if (angle) {
|
3848
3905
|
cos = Math.cos(angle);
|
3849
3906
|
sin = Math.sin(angle);
|
@@ -3856,7 +3913,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3856
3913
|
a11 *= cos;
|
3857
3914
|
a21 *= cos;
|
3858
3915
|
}
|
3859
|
-
angle =
|
3916
|
+
angle = rotationX * _DEG2RAD;
|
3860
3917
|
if (angle) {
|
3861
3918
|
cos = Math.cos(angle);
|
3862
3919
|
sin = Math.sin(angle);
|
@@ -3890,13 +3947,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3890
3947
|
a41*=sx;
|
3891
3948
|
}
|
3892
3949
|
|
3893
|
-
if (zOrigin ||
|
3950
|
+
if (zOrigin || isSVG) {
|
3894
3951
|
if (zOrigin) {
|
3895
3952
|
x += a13*-zOrigin;
|
3896
3953
|
y += a23*-zOrigin;
|
3897
3954
|
z += a33*-zOrigin+zOrigin;
|
3898
3955
|
}
|
3899
|
-
if (
|
3956
|
+
if (isSVG) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually
|
3900
3957
|
x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12);
|
3901
3958
|
y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22);
|
3902
3959
|
}
|
@@ -3915,7 +3972,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3915
3972
|
transform = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d(");
|
3916
3973
|
transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31);
|
3917
3974
|
transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22);
|
3918
|
-
if (
|
3975
|
+
if (rotationX || rotationY) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations)
|
3919
3976
|
transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13);
|
3920
3977
|
transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma;
|
3921
3978
|
} else {
|
@@ -3924,57 +3981,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3924
3981
|
transform += x + comma + y + comma + z + comma + (perspective ? (1 + (-z / perspective)) : 1) + ")";
|
3925
3982
|
|
3926
3983
|
style[_transformProp] = transform;
|
3927
|
-
},
|
3928
|
-
|
3929
|
-
_set2DTransformRatio = _internals.set2DTransformRatio = function(v) {
|
3930
|
-
var t = this.data, //refers to the element's _gsTransform object
|
3931
|
-
targ = this.t,
|
3932
|
-
style = targ.style,
|
3933
|
-
x = t.x,
|
3934
|
-
y = t.y,
|
3935
|
-
ang, skew, rnd, sx, sy, a, b, c, d, matrix, min, t1;
|
3936
|
-
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.
|
3937
|
-
this.setRatio = _set3DTransformRatio;
|
3938
|
-
_set3DTransformRatio.call(this, v);
|
3939
|
-
return;
|
3940
|
-
}
|
3941
|
-
sx = t.scaleX;
|
3942
|
-
sy = t.scaleY;
|
3943
|
-
if (t.rotation || t.skewX || t.svg) {
|
3944
|
-
ang = t.rotation * _DEG2RAD;
|
3945
|
-
skew = t.skewX * _DEG2RAD;
|
3946
|
-
rnd = 100000;
|
3947
|
-
a = Math.cos(ang) * sx;
|
3948
|
-
b = Math.sin(ang) * sx;
|
3949
|
-
c = Math.sin(ang - skew) * -sy;
|
3950
|
-
d = Math.cos(ang - skew) * sy;
|
3951
|
-
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
|
3952
|
-
t1 = Math.tan(skew);
|
3953
|
-
t1 = Math.sqrt(1 + t1 * t1);
|
3954
|
-
c *= t1;
|
3955
|
-
d *= t1;
|
3956
|
-
}
|
3957
|
-
if (t.svg) {
|
3958
|
-
x += t.xOrigin - (t.xOrigin * a + t.yOrigin * c);
|
3959
|
-
y += t.yOrigin - (t.xOrigin * b + t.yOrigin * d);
|
3960
|
-
min = 0.000001;
|
3961
|
-
if (x < min) if (x > -min) {
|
3962
|
-
x = 0;
|
3963
|
-
}
|
3964
|
-
if (y < min) if (y > -min) {
|
3965
|
-
y = 0;
|
3966
|
-
}
|
3967
|
-
}
|
3968
|
-
matrix = (((a * rnd) | 0) / rnd) + "," + (((b * rnd) | 0) / rnd) + "," + (((c * rnd) | 0) / rnd) + "," + (((d * rnd) | 0) / rnd) + "," + x + "," + y + ")";
|
3969
|
-
if (t.svg && _useSVGTransformAttr) {
|
3970
|
-
targ.setAttribute("transform", "matrix(" + matrix);
|
3971
|
-
} else {
|
3972
|
-
//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 5 decimal places.
|
3973
|
-
style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + matrix;
|
3974
|
-
}
|
3975
|
-
} else {
|
3976
|
-
style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + sx + ",0,0," + sy + "," + x + "," + y + ")";
|
3977
|
-
}
|
3978
3984
|
};
|
3979
3985
|
|
3980
3986
|
p = Transform.prototype;
|
@@ -4100,7 +4106,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4100
4106
|
pt.xs0 = pt.e = orig;
|
4101
4107
|
}
|
4102
4108
|
|
4103
|
-
|
4109
|
+
//for older versions of IE (6-8), we need to manually calculate things inside the setRatio() function. We record origin x and y (ox and oy) and whether or not the values are percentages (oxp and oyp).
|
4104
4110
|
} else {
|
4105
4111
|
_parsePosition(orig + "", m1);
|
4106
4112
|
}
|
@@ -4349,14 +4355,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4349
4355
|
}
|
4350
4356
|
t._gsClassPT = pt;
|
4351
4357
|
pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("\\s*\\b" + e.substr(2) + "\\b"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : "");
|
4352
|
-
|
4353
|
-
|
4354
|
-
|
4355
|
-
|
4356
|
-
|
4357
|
-
|
4358
|
-
pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)
|
4359
|
-
}
|
4358
|
+
t.setAttribute("class", pt.e);
|
4359
|
+
difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);
|
4360
|
+
t.setAttribute("class", b);
|
4361
|
+
pt.data = difData.firstMPT;
|
4362
|
+
t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
|
4363
|
+
pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)
|
4360
4364
|
return pt;
|
4361
4365
|
}});
|
4362
4366
|
|
@@ -4365,7 +4369,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4365
4369
|
if (v === 1 || v === 0) if (this.data._totalTime === this.data._totalDuration && this.data.data !== "isFromStart") { //this.data refers to the tween. Only clear at the END of the tween (remember, from() tweens make the ratio go from 1 to 0, so we can't just check that and if the tween is the zero-duration one that's created internally to render the starting values in a from() tween, ignore that because otherwise, for example, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in).
|
4366
4370
|
var s = this.t.style,
|
4367
4371
|
transformParse = _specialProps.transform.parse,
|
4368
|
-
a, p, i, clearTransform;
|
4372
|
+
a, p, i, clearTransform, transform;
|
4369
4373
|
if (this.e === "all") {
|
4370
4374
|
s.cssText = "";
|
4371
4375
|
clearTransform = true;
|
@@ -4386,7 +4390,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4386
4390
|
}
|
4387
4391
|
if (clearTransform) {
|
4388
4392
|
_removeProp(s, _transformProp);
|
4389
|
-
|
4393
|
+
transform = this.t._gsTransform;
|
4394
|
+
if (transform) {
|
4395
|
+
if (transform.svg) {
|
4396
|
+
this.t.removeAttribute("data-svg-origin");
|
4397
|
+
}
|
4390
4398
|
delete this.t._gsTransform;
|
4391
4399
|
}
|
4392
4400
|
}
|
@@ -4453,7 +4461,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4453
4461
|
vars = v;
|
4454
4462
|
style.cssText = first;
|
4455
4463
|
}
|
4456
|
-
|
4464
|
+
|
4465
|
+
if (vars.className) { //className tweens will combine any differences they find in the css with the vars that are passed in, so {className:"myClass", scale:0.5, left:20} would work.
|
4466
|
+
this._firstPT = pt = _specialProps.className.parse(target, vars.className, "className", this, null, null, vars);
|
4467
|
+
} else {
|
4468
|
+
this._firstPT = pt = this.parse(target, vars, null);
|
4469
|
+
}
|
4457
4470
|
|
4458
4471
|
if (this._transformType) {
|
4459
4472
|
threeD = (this._transformType === 3);
|
@@ -4483,9 +4496,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4483
4496
|
}
|
4484
4497
|
tpt = new CSSPropTween(target, "transform", 0, 0, null, 2);
|
4485
4498
|
this._linkCSSP(tpt, null, pt2);
|
4486
|
-
tpt.setRatio =
|
4499
|
+
tpt.setRatio = _transformProp ? _setTransformRatio : _setIETransformRatio;
|
4487
4500
|
tpt.data = this._transform || _getTransform(target, _cs, true);
|
4488
4501
|
tpt.tween = tween;
|
4502
|
+
tpt.pr = -1; //ensures that the transforms get applied after the components are updated.
|
4489
4503
|
_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.
|
4490
4504
|
}
|
4491
4505
|
|
@@ -5789,7 +5803,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
5789
5803
|
|
5790
5804
|
//a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition.
|
5791
5805
|
setTimeout(function() {
|
5792
|
-
if (_useRAF &&
|
5806
|
+
if (_useRAF && _self.frame < 5) {
|
5793
5807
|
_self.useRAF(false);
|
5794
5808
|
}
|
5795
5809
|
}, 1500);
|
@@ -6326,7 +6340,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6326
6340
|
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
6327
6341
|
p._notifyPluginsOfEnabled = p._lazy = false;
|
6328
6342
|
|
6329
|
-
TweenLite.version = "1.16.
|
6343
|
+
TweenLite.version = "1.16.1";
|
6330
6344
|
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
6331
6345
|
TweenLite.defaultOverwrite = "auto";
|
6332
6346
|
TweenLite.ticker = _ticker;
|
@@ -6690,6 +6704,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6690
6704
|
if (!this._reversed ) {
|
6691
6705
|
isComplete = true;
|
6692
6706
|
callback = "onComplete";
|
6707
|
+
force = (force || this._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
|
6693
6708
|
}
|
6694
6709
|
if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
|
6695
6710
|
if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
|