greensock-rails 1.19.0.0 → 1.19.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/greensock/rails/version.rb +1 -1
- data/vendor/assets/javascripts/greensock/TimelineLite.js +9 -9
- data/vendor/assets/javascripts/greensock/TimelineMax.js +25 -16
- data/vendor/assets/javascripts/greensock/TweenLite.js +28 -24
- data/vendor/assets/javascripts/greensock/TweenMax.js +139 -82
- data/vendor/assets/javascripts/greensock/easing/EasePack.js +2 -2
- data/vendor/assets/javascripts/greensock/jquery.gsap.js +2 -2
- data/vendor/assets/javascripts/greensock/plugins/AttrPlugin.js +17 -3
- data/vendor/assets/javascripts/greensock/plugins/BezierPlugin.js +3 -3
- data/vendor/assets/javascripts/greensock/plugins/CSSPlugin.js +91 -47
- data/vendor/assets/javascripts/greensock/plugins/CSSRulePlugin.js +3 -3
- data/vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js +16 -2
- data/vendor/assets/javascripts/greensock/plugins/DirectionalRotationPlugin.js +17 -3
- data/vendor/assets/javascripts/greensock/plugins/EaselPlugin.js +27 -7
- data/vendor/assets/javascripts/greensock/plugins/EndArrayPlugin.js +2 -2
- data/vendor/assets/javascripts/greensock/plugins/ModifiersPlugin.js +18 -4
- data/vendor/assets/javascripts/greensock/plugins/RaphaelPlugin.js +2 -2
- data/vendor/assets/javascripts/greensock/plugins/RoundPropsPlugin.js +2 -2
- data/vendor/assets/javascripts/greensock/plugins/ScrollToPlugin.js +6 -5
- data/vendor/assets/javascripts/greensock/plugins/TEMPLATE_Plugin.js +2 -2
- data/vendor/assets/javascripts/greensock/plugins/TextPlugin.js +17 -3
- data/vendor/assets/javascripts/greensock/utils/Draggable.js +170 -52
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcb547012d476aa57d085849cfc50be709d52caa
|
4
|
+
data.tar.gz: 34c5d996df9b6ef1d14cb7b62334b768b8b55422
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd485934b738923cc3013f1dbb5522aeb7ef3a5e11fba8f75ab9bd9e3e478c79831190398987fe1c6677bd148f45de409c0becbeb7d7a71943d8bef76ebdb9a
|
7
|
+
data.tar.gz: c8fecaa2333bd6aa7b8c6314f0dfb70e032e11fb1f85fc54f3aca16aaebc0d60d5fddef88617e5e004cd08ebfcac2301d89c5ef85e79f3444362ff8813c41dd3
|
data/README.md
CHANGED
@@ -59,4 +59,4 @@ Greensock JS: Copyright (c) 2015, GreenSock. All rights reserved.
|
|
59
59
|
<img width="192" src="https://raw.githubusercontent.com/handcraftedLDN/greensock-rails/master/handcrafted-digital-london-logo@2x.png" alt="Handcrafted Digital London - Fine, hand made design and development from London"/>
|
60
60
|
</a>
|
61
61
|
|
62
|
-
Copyright ©
|
62
|
+
Copyright © 2017 The <a href="https://github.com/handcraftedLDN/greensock-rails" target="_blank">greensock-rails</a> gem has been <a href="http://handcrafteddigital.london" target="_blank">Handcrafted</a>.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 1.19.1
|
3
|
+
* DATE: 2017-01-17
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
|
-
* @license Copyright (c) 2008-
|
6
|
+
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
7
7
|
* This work is subject to the terms at http://greensock.com/standard-license or for
|
8
8
|
* Club GreenSock members, the software agreement that was issued with your membership.
|
9
9
|
*
|
@@ -69,7 +69,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
69
69
|
},
|
70
70
|
p = TimelineLite.prototype = new SimpleTimeline();
|
71
71
|
|
72
|
-
TimelineLite.version = "1.19.
|
72
|
+
TimelineLite.version = "1.19.1";
|
73
73
|
p.constructor = TimelineLite;
|
74
74
|
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
75
75
|
|
@@ -274,8 +274,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
274
274
|
var last = this._last;
|
275
275
|
if (!last) {
|
276
276
|
this._time = this._totalTime = this._duration = this._totalDuration = 0;
|
277
|
-
} else if (this._time >
|
278
|
-
this._time = this.
|
277
|
+
} else if (this._time > this.duration()) {
|
278
|
+
this._time = this._duration;
|
279
279
|
this._totalTime = this._totalDuration;
|
280
280
|
}
|
281
281
|
return this;
|
@@ -374,7 +374,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
374
374
|
prevTimeScale = this._timeScale,
|
375
375
|
prevPaused = this._paused,
|
376
376
|
tween, isComplete, next, callback, internalForce, pauseTween, curTime;
|
377
|
-
if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
|
377
|
+
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
378
378
|
this._totalTime = this._time = totalDur;
|
379
379
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
380
380
|
isComplete = true;
|
@@ -755,8 +755,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
755
755
|
return (tl === Animation._rootFramesTimeline);
|
756
756
|
};
|
757
757
|
|
758
|
-
p.rawTime = function() {
|
759
|
-
return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale;
|
758
|
+
p.rawTime = function(wrapRepeats) {
|
759
|
+
return (wrapRepeats && (this._paused || (this._repeat && this.time() > 0 && this.totalProgress() < 1))) ? this._totalTime % (this._duration + this._repeatDelay) : this._paused ? this._totalTime : (this._timeline.rawTime(wrapRepeats) - this._startTime) * this._timeScale;
|
760
760
|
};
|
761
761
|
|
762
762
|
return TimelineLite;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 1.19.1
|
3
|
+
* DATE: 2017-01-17
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
|
-
* @license Copyright (c) 2008-
|
6
|
+
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
7
7
|
* This work is subject to the terms at http://greensock.com/standard-license or for
|
8
8
|
* Club GreenSock members, the software agreement that was issued with your membership.
|
9
9
|
*
|
@@ -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.19.
|
37
|
+
TimelineMax.version = "1.19.1";
|
38
38
|
|
39
39
|
p.invalidate = function() {
|
40
40
|
this._yoyo = (this.vars.yoyo === true);
|
@@ -87,7 +87,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
87
87
|
t.duration( Math.abs( t.vars.time - t.target.time()) / t.target._timeScale );
|
88
88
|
}
|
89
89
|
if (vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it.
|
90
|
-
t._callback("onStart")
|
90
|
+
vars.onStart.apply(vars.onStartScope || vars.callbackScope || t, vars.onStartParams || []); //don't use t._callback("onStart") or it'll point to the copy.onStart and we'll get a recursion error.
|
91
91
|
}
|
92
92
|
};
|
93
93
|
return t;
|
@@ -116,7 +116,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
116
116
|
prevPaused = this._paused,
|
117
117
|
prevCycle = this._cycle,
|
118
118
|
tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime;
|
119
|
-
if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
|
119
|
+
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
120
120
|
if (!this._locked) {
|
121
121
|
this._totalTime = totalDur;
|
122
122
|
this._cycle = this._repeat;
|
@@ -203,9 +203,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
203
203
|
}
|
204
204
|
}
|
205
205
|
|
206
|
-
if (this._hasPause && !this._forcingPlayhead && !suppressEvents) {
|
206
|
+
if (this._hasPause && !this._forcingPlayhead && !suppressEvents && time < dur) {
|
207
207
|
time = this._time;
|
208
|
-
if (time >= prevTime) {
|
208
|
+
if (time >= prevTime || (this._repeat && prevCycle !== this._cycle)) {
|
209
209
|
tween = this._first;
|
210
210
|
while (tween && tween._startTime <= time && !pauseTween) {
|
211
211
|
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && this._rawPrevTime === 0)) {
|
@@ -261,6 +261,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
261
261
|
this.render(prevTime, suppressEvents, (dur === 0));
|
262
262
|
if (!suppressEvents) if (!this._gc) {
|
263
263
|
if (this.vars.onRepeat) {
|
264
|
+
this._cycle = recCycle; //in case the onRepeat alters the playhead or invalidates(), we shouldn't stay locked or use the previous cycle.
|
265
|
+
this._locked = false;
|
264
266
|
this._callback("onRepeat");
|
265
267
|
}
|
266
268
|
}
|
@@ -268,6 +270,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
268
270
|
return;
|
269
271
|
}
|
270
272
|
if (wrap) {
|
273
|
+
this._cycle = prevCycle; //if there's an onRepeat, we reverted this above, so make sure it's set properly again. We also unlocked in that scenario, so reset that too.
|
274
|
+
this._locked = true;
|
271
275
|
prevTime = (backwards) ? dur + 0.0001 : -0.0001;
|
272
276
|
this.render(prevTime, true, false);
|
273
277
|
}
|
@@ -431,7 +435,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
431
435
|
});
|
432
436
|
return a;
|
433
437
|
};
|
434
|
-
|
438
|
+
|
439
|
+
p.invalidate = function() {
|
440
|
+
this._locked = false; //unlock and set cycle in case invalidate() is called from inside an onRepeat
|
441
|
+
return TimelineLite.prototype.invalidate.call(this);
|
442
|
+
};
|
443
|
+
|
435
444
|
|
436
445
|
//---- GETTERS / SETTERS -------------------------------------------------------------------------------------------------------
|
437
446
|
|
@@ -561,7 +570,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
561
570
|
p, val;
|
562
571
|
for (p in alt) {
|
563
572
|
val = alt[p];
|
564
|
-
vars[p] = (typeof(val) === "function") ? val
|
573
|
+
vars[p] = (typeof(val) === "function") ? val(i, targets[i]) : val[i % val.length];
|
565
574
|
}
|
566
575
|
delete vars.cycle;
|
567
576
|
},
|
@@ -575,7 +584,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
575
584
|
},
|
576
585
|
p = TimelineLite.prototype = new SimpleTimeline();
|
577
586
|
|
578
|
-
TimelineLite.version = "1.19.
|
587
|
+
TimelineLite.version = "1.19.1";
|
579
588
|
p.constructor = TimelineLite;
|
580
589
|
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
581
590
|
|
@@ -780,8 +789,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
780
789
|
var last = this._last;
|
781
790
|
if (!last) {
|
782
791
|
this._time = this._totalTime = this._duration = this._totalDuration = 0;
|
783
|
-
} else if (this._time >
|
784
|
-
this._time = this.
|
792
|
+
} else if (this._time > this.duration()) {
|
793
|
+
this._time = this._duration;
|
785
794
|
this._totalTime = this._totalDuration;
|
786
795
|
}
|
787
796
|
return this;
|
@@ -880,7 +889,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
880
889
|
prevTimeScale = this._timeScale,
|
881
890
|
prevPaused = this._paused,
|
882
891
|
tween, isComplete, next, callback, internalForce, pauseTween, curTime;
|
883
|
-
if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
|
892
|
+
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
884
893
|
this._totalTime = this._time = totalDur;
|
885
894
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
886
895
|
isComplete = true;
|
@@ -1261,8 +1270,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1261
1270
|
return (tl === Animation._rootFramesTimeline);
|
1262
1271
|
};
|
1263
1272
|
|
1264
|
-
p.rawTime = function() {
|
1265
|
-
return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale;
|
1273
|
+
p.rawTime = function(wrapRepeats) {
|
1274
|
+
return (wrapRepeats && (this._paused || (this._repeat && this.time() > 0 && this.totalProgress() < 1))) ? this._totalTime % (this._duration + this._repeatDelay) : this._paused ? this._totalTime : (this._timeline.rawTime(wrapRepeats) - this._startTime) * this._timeScale;
|
1266
1275
|
};
|
1267
1276
|
|
1268
1277
|
return TimelineLite;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.19.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 1.19.1
|
3
|
+
* DATE: 2017-01-17
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
|
-
* @license Copyright (c) 2008-
|
6
|
+
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
7
7
|
* This work is subject to the terms at http://greensock.com/standard-license or for
|
8
8
|
* Club GreenSock members, the software agreement that was issued with your membership.
|
9
9
|
*
|
@@ -13,6 +13,7 @@
|
|
13
13
|
|
14
14
|
"use strict";
|
15
15
|
var _exports = {},
|
16
|
+
_doc = window.document,
|
16
17
|
_globals = window.GreenSockGlobals = window.GreenSockGlobals || window;
|
17
18
|
if (_globals.TweenLite) {
|
18
19
|
return; //in case the core set of classes is already loaded, don't instantiate twice.
|
@@ -389,7 +390,7 @@
|
|
389
390
|
|
390
391
|
//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.
|
391
392
|
setTimeout(function() {
|
392
|
-
if (_useRAF === "auto" && _self.frame < 5 &&
|
393
|
+
if (_useRAF === "auto" && _self.frame < 5 && _doc.visibilityState !== "hidden") {
|
393
394
|
_self.useRAF(false);
|
394
395
|
}
|
395
396
|
}, 1500);
|
@@ -501,7 +502,7 @@
|
|
501
502
|
var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active.
|
502
503
|
startTime = this._startTime,
|
503
504
|
rawTime;
|
504
|
-
return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime()) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale));
|
505
|
+
return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime(true)) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale));
|
505
506
|
};
|
506
507
|
|
507
508
|
p._enabled = function (enabled, ignoreTimeline) {
|
@@ -945,7 +946,7 @@
|
|
945
946
|
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
946
947
|
p._notifyPluginsOfEnabled = p._lazy = false;
|
947
948
|
|
948
|
-
TweenLite.version = "1.19.
|
949
|
+
TweenLite.version = "1.19.1";
|
949
950
|
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
950
951
|
TweenLite.defaultOverwrite = "auto";
|
951
952
|
TweenLite.ticker = _ticker;
|
@@ -960,7 +961,7 @@
|
|
960
961
|
TweenLite.selector = selector;
|
961
962
|
return selector(e);
|
962
963
|
}
|
963
|
-
return (typeof(
|
964
|
+
return (typeof(_doc) === "undefined") ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));
|
964
965
|
};
|
965
966
|
|
966
967
|
var _lazyTweens = [],
|
@@ -972,10 +973,10 @@
|
|
972
973
|
min = 0.000001,
|
973
974
|
val;
|
974
975
|
while (pt) {
|
975
|
-
val = !pt.blob ? pt.c * v + pt.s : v ? this.join("") : this.start;
|
976
|
+
val = !pt.blob ? pt.c * v + pt.s : (v === 1) ? this.end : v ? this.join("") : this.start;
|
976
977
|
if (pt.m) {
|
977
978
|
val = pt.m(val, this._target || pt.t);
|
978
|
-
} else if (val < min) if (val > -min) { //prevents issues with converting very small numbers to strings in the browser
|
979
|
+
} else if (val < min) if (val > -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browser
|
979
980
|
val = 0;
|
980
981
|
}
|
981
982
|
if (!pt.f) {
|
@@ -990,12 +991,15 @@
|
|
990
991
|
},
|
991
992
|
//compares two strings (start/end), finds the numbers that are different and spits back an array representing the whole value but with the changing values isolated as elements. For example, "rgb(0,0,0)" and "rgb(100,50,0)" would become ["rgb(", 0, ",", 50, ",0)"]. Notice it merges the parts that are identical (performance optimization). The array also has a linked list of PropTweens attached starting with _firstPT that contain the tweening data (t, p, s, c, f, etc.). It also stores the starting value as a "start" property so that we can revert to it if/when necessary, like when a tween rewinds fully. If the quantity of numbers differs between the start and end, it will always prioritize the end value(s). The pt parameter is optional - it's for a PropTween that will be appended to the end of the linked list and is typically for actually setting the value after all of the elements have been updated (with array.join("")).
|
992
993
|
_blobDif = function(start, end, filter, pt) {
|
993
|
-
var a = [
|
994
|
+
var a = [],
|
994
995
|
charIndex = 0,
|
995
996
|
s = "",
|
996
997
|
color = 0,
|
997
998
|
startNums, endNums, num, i, l, nonNumbers, currentNum;
|
998
999
|
a.start = start;
|
1000
|
+
a.end = end;
|
1001
|
+
start = a[0] = start + ""; //ensure values are strings
|
1002
|
+
end = a[1] = end + "";
|
999
1003
|
if (filter) {
|
1000
1004
|
filter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values.
|
1001
1005
|
start = a[0];
|
@@ -1046,24 +1050,24 @@
|
|
1046
1050
|
if (typeof(end) === "function") {
|
1047
1051
|
end = end(index || 0, target);
|
1048
1052
|
}
|
1049
|
-
var
|
1050
|
-
|
1053
|
+
var type = typeof(target[prop]),
|
1054
|
+
getterName = (type !== "function") ? "" : ((prop.indexOf("set") || typeof(target["get" + prop.substr(3)]) !== "function") ? prop : "get" + prop.substr(3)),
|
1055
|
+
s = (start !== "get") ? start : !getterName ? target[prop] : funcParam ? target[getterName](funcParam) : target[getterName](),
|
1051
1056
|
isRelative = (typeof(end) === "string" && end.charAt(1) === "="),
|
1052
1057
|
pt = {t:target, p:prop, s:s, f:(type === "function"), pg:0, n:overwriteProp || prop, m:(!mod ? 0 : (typeof(mod) === "function") ? mod : Math.round), pr:0, c:isRelative ? parseInt(end.charAt(0) + "1", 10) * parseFloat(end.substr(2)) : (parseFloat(end) - s) || 0},
|
1053
|
-
blob
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
pt.s = s = funcParam ? target[getterName](funcParam) : target[getterName]();
|
1058
|
-
}
|
1059
|
-
if (typeof(s) === "string" && (funcParam || isNaN(s))) {
|
1058
|
+
blob;
|
1059
|
+
|
1060
|
+
if (typeof(s) !== "number" || (typeof(end) !== "number" && !isRelative)) {
|
1061
|
+
if (funcParam || isNaN(s) || (!isRelative && isNaN(end)) || typeof(s) === "boolean" || typeof(end) === "boolean") {
|
1060
1062
|
//a blob (string that has multiple numbers in it)
|
1061
1063
|
pt.fp = funcParam;
|
1062
|
-
blob = _blobDif(s, end, stringFilter || TweenLite.defaultStringFilter, pt);
|
1063
|
-
pt = {t:blob, p:"setRatio", s:0, c:1, f:2, pg:0, n:overwriteProp || prop, pr:0, m:0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example.
|
1064
|
-
} else
|
1064
|
+
blob = _blobDif(s, (isRelative ? pt.s + pt.c : end), stringFilter || TweenLite.defaultStringFilter, pt);
|
1065
|
+
pt = {t: blob, p: "setRatio", s: 0, c: 1, f: 2, pg: 0, n: overwriteProp || prop, pr: 0, m: 0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example.
|
1066
|
+
} else {
|
1065
1067
|
pt.s = parseFloat(s);
|
1066
|
-
|
1068
|
+
if (!isRelative) {
|
1069
|
+
pt.c = (parseFloat(end) - pt.s) || 0;
|
1070
|
+
}
|
1067
1071
|
}
|
1068
1072
|
}
|
1069
1073
|
if (pt.c) { //only add it to the linked list if there's a change.
|
@@ -1409,7 +1413,7 @@
|
|
1409
1413
|
duration = this._duration,
|
1410
1414
|
prevRawPrevTime = this._rawPrevTime,
|
1411
1415
|
isComplete, callback, pt, rawPrevTime;
|
1412
|
-
if (time >= duration - 0.0000001) { //to work around occasional floating point math artifacts.
|
1416
|
+
if (time >= duration - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
1413
1417
|
this._totalTime = this._time = duration;
|
1414
1418
|
this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;
|
1415
1419
|
if (!this._reversed ) {
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.19.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 1.19.1
|
3
|
+
* DATE: 2017-01-17
|
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
|
7
7
|
*
|
8
|
-
* @license Copyright (c) 2008-
|
8
|
+
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
9
9
|
* This work is subject to the terms at http://greensock.com/standard-license or for
|
10
10
|
* Club GreenSock members, the software agreement that was issued with your membership.
|
11
11
|
*
|
@@ -50,7 +50,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
50
50
|
p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
|
51
51
|
_blankArray = [];
|
52
52
|
|
53
|
-
TweenMax.version = "1.19.
|
53
|
+
TweenMax.version = "1.19.1";
|
54
54
|
p.constructor = TweenMax;
|
55
55
|
p.kill()._gc = false;
|
56
56
|
TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
|
@@ -131,7 +131,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
131
131
|
duration = this._duration,
|
132
132
|
prevRawPrevTime = this._rawPrevTime,
|
133
133
|
isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime;
|
134
|
-
if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
|
134
|
+
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
135
135
|
this._totalTime = totalDur;
|
136
136
|
this._cycle = this._repeat;
|
137
137
|
if (this._yoyo && (this._cycle & 1) !== 0) {
|
@@ -673,7 +673,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
673
673
|
p, val;
|
674
674
|
for (p in alt) {
|
675
675
|
val = alt[p];
|
676
|
-
vars[p] = (typeof(val) === "function") ? val
|
676
|
+
vars[p] = (typeof(val) === "function") ? val(i, targets[i]) : val[i % val.length];
|
677
677
|
}
|
678
678
|
delete vars.cycle;
|
679
679
|
},
|
@@ -687,7 +687,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
687
687
|
},
|
688
688
|
p = TimelineLite.prototype = new SimpleTimeline();
|
689
689
|
|
690
|
-
TimelineLite.version = "1.19.
|
690
|
+
TimelineLite.version = "1.19.1";
|
691
691
|
p.constructor = TimelineLite;
|
692
692
|
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
693
693
|
|
@@ -892,8 +892,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
892
892
|
var last = this._last;
|
893
893
|
if (!last) {
|
894
894
|
this._time = this._totalTime = this._duration = this._totalDuration = 0;
|
895
|
-
} else if (this._time >
|
896
|
-
this._time = this.
|
895
|
+
} else if (this._time > this.duration()) {
|
896
|
+
this._time = this._duration;
|
897
897
|
this._totalTime = this._totalDuration;
|
898
898
|
}
|
899
899
|
return this;
|
@@ -992,7 +992,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
992
992
|
prevTimeScale = this._timeScale,
|
993
993
|
prevPaused = this._paused,
|
994
994
|
tween, isComplete, next, callback, internalForce, pauseTween, curTime;
|
995
|
-
if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
|
995
|
+
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
996
996
|
this._totalTime = this._time = totalDur;
|
997
997
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
998
998
|
isComplete = true;
|
@@ -1373,8 +1373,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1373
1373
|
return (tl === Animation._rootFramesTimeline);
|
1374
1374
|
};
|
1375
1375
|
|
1376
|
-
p.rawTime = function() {
|
1377
|
-
return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale;
|
1376
|
+
p.rawTime = function(wrapRepeats) {
|
1377
|
+
return (wrapRepeats && (this._paused || (this._repeat && this.time() > 0 && this.totalProgress() < 1))) ? this._totalTime % (this._duration + this._repeatDelay) : this._paused ? this._totalTime : (this._timeline.rawTime(wrapRepeats) - this._startTime) * this._timeScale;
|
1378
1378
|
};
|
1379
1379
|
|
1380
1380
|
return TimelineLite;
|
@@ -1418,7 +1418,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1418
1418
|
|
1419
1419
|
p.constructor = TimelineMax;
|
1420
1420
|
p.kill()._gc = false;
|
1421
|
-
TimelineMax.version = "1.19.
|
1421
|
+
TimelineMax.version = "1.19.1";
|
1422
1422
|
|
1423
1423
|
p.invalidate = function() {
|
1424
1424
|
this._yoyo = (this.vars.yoyo === true);
|
@@ -1471,7 +1471,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1471
1471
|
t.duration( Math.abs( t.vars.time - t.target.time()) / t.target._timeScale );
|
1472
1472
|
}
|
1473
1473
|
if (vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it.
|
1474
|
-
t._callback("onStart")
|
1474
|
+
vars.onStart.apply(vars.onStartScope || vars.callbackScope || t, vars.onStartParams || []); //don't use t._callback("onStart") or it'll point to the copy.onStart and we'll get a recursion error.
|
1475
1475
|
}
|
1476
1476
|
};
|
1477
1477
|
return t;
|
@@ -1500,7 +1500,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1500
1500
|
prevPaused = this._paused,
|
1501
1501
|
prevCycle = this._cycle,
|
1502
1502
|
tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime;
|
1503
|
-
if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
|
1503
|
+
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
1504
1504
|
if (!this._locked) {
|
1505
1505
|
this._totalTime = totalDur;
|
1506
1506
|
this._cycle = this._repeat;
|
@@ -1587,9 +1587,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1587
1587
|
}
|
1588
1588
|
}
|
1589
1589
|
|
1590
|
-
if (this._hasPause && !this._forcingPlayhead && !suppressEvents) {
|
1590
|
+
if (this._hasPause && !this._forcingPlayhead && !suppressEvents && time < dur) {
|
1591
1591
|
time = this._time;
|
1592
|
-
if (time >= prevTime) {
|
1592
|
+
if (time >= prevTime || (this._repeat && prevCycle !== this._cycle)) {
|
1593
1593
|
tween = this._first;
|
1594
1594
|
while (tween && tween._startTime <= time && !pauseTween) {
|
1595
1595
|
if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && this._rawPrevTime === 0)) {
|
@@ -1645,6 +1645,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1645
1645
|
this.render(prevTime, suppressEvents, (dur === 0));
|
1646
1646
|
if (!suppressEvents) if (!this._gc) {
|
1647
1647
|
if (this.vars.onRepeat) {
|
1648
|
+
this._cycle = recCycle; //in case the onRepeat alters the playhead or invalidates(), we shouldn't stay locked or use the previous cycle.
|
1649
|
+
this._locked = false;
|
1648
1650
|
this._callback("onRepeat");
|
1649
1651
|
}
|
1650
1652
|
}
|
@@ -1652,6 +1654,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1652
1654
|
return;
|
1653
1655
|
}
|
1654
1656
|
if (wrap) {
|
1657
|
+
this._cycle = prevCycle; //if there's an onRepeat, we reverted this above, so make sure it's set properly again. We also unlocked in that scenario, so reset that too.
|
1658
|
+
this._locked = true;
|
1655
1659
|
prevTime = (backwards) ? dur + 0.0001 : -0.0001;
|
1656
1660
|
this.render(prevTime, true, false);
|
1657
1661
|
}
|
@@ -1816,6 +1820,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1816
1820
|
return a;
|
1817
1821
|
};
|
1818
1822
|
|
1823
|
+
p.invalidate = function() {
|
1824
|
+
this._locked = false; //unlock and set cycle in case invalidate() is called from inside an onRepeat
|
1825
|
+
return TimelineLite.prototype.invalidate.call(this);
|
1826
|
+
};
|
1827
|
+
|
1819
1828
|
|
1820
1829
|
//---- GETTERS / SETTERS -------------------------------------------------------------------------------------------------------
|
1821
1830
|
|
@@ -2536,7 +2545,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2536
2545
|
p = CSSPlugin.prototype = new TweenPlugin("css");
|
2537
2546
|
|
2538
2547
|
p.constructor = CSSPlugin;
|
2539
|
-
CSSPlugin.version = "1.19.
|
2548
|
+
CSSPlugin.version = "1.19.1";
|
2540
2549
|
CSSPlugin.API = 2;
|
2541
2550
|
CSSPlugin.defaultTransformPerspective = 0;
|
2542
2551
|
CSSPlugin.defaultSkewType = "compensated";
|
@@ -2566,14 +2575,15 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2566
2575
|
_DEG2RAD = Math.PI / 180,
|
2567
2576
|
_RAD2DEG = 180 / Math.PI,
|
2568
2577
|
_forcePT = {},
|
2569
|
-
|
2570
|
-
|
2571
|
-
|
2578
|
+
_dummyElement = {style:{}},
|
2579
|
+
_doc = _gsScope.document || {createElement: function() {return _dummyElement;}},
|
2580
|
+
_createElement = function(type, ns) {
|
2581
|
+
return _doc.createElementNS ? _doc.createElementNS(ns || "http://www.w3.org/1999/xhtml", type) : _doc.createElement(type);
|
2572
2582
|
},
|
2573
2583
|
_tempDiv = _createElement("div"),
|
2574
2584
|
_tempImg = _createElement("img"),
|
2575
2585
|
_internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins
|
2576
|
-
_agent = navigator.userAgent,
|
2586
|
+
_agent = (_gsScope.navigator || {}).userAgent || "",
|
2577
2587
|
_autoRound,
|
2578
2588
|
_reqSafariFix, //we won't apply the Safari transform fix until we actually come across a tween that affects a transform property (to maintain best performance).
|
2579
2589
|
|
@@ -2584,8 +2594,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2584
2594
|
_supportsOpacity = (function() { //we set _isSafari, _ieVers, _isFirefox, and _supportsOpacity all in one function here to reduce file size slightly, especially in the minified version.
|
2585
2595
|
var i = _agent.indexOf("Android"),
|
2586
2596
|
a = _createElement("a");
|
2587
|
-
_isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 ||
|
2588
|
-
_isSafariLT6 = (_isSafari && (
|
2597
|
+
_isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || parseFloat(_agent.substr(i+8, 2)) > 3));
|
2598
|
+
_isSafariLT6 = (_isSafari && (parseFloat(_agent.substr(_agent.indexOf("Version/")+8, 2)) < 6));
|
2589
2599
|
_isFirefox = (_agent.indexOf("Firefox") !== -1);
|
2590
2600
|
if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {
|
2591
2601
|
_ieVers = parseFloat( RegExp.$1 );
|
@@ -2600,7 +2610,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2600
2610
|
return (_opacityExp.test( ((typeof(v) === "string") ? v : (v.currentStyle ? v.currentStyle.filter : v.style.filter) || "") ) ? ( parseFloat( RegExp.$1 ) / 100 ) : 1);
|
2601
2611
|
},
|
2602
2612
|
_log = function(s) {//for logging messages, but in a way that won't throw errors in old versions of IE.
|
2603
|
-
if (
|
2613
|
+
if (_gsScope.console) {
|
2604
2614
|
console.log(s);
|
2605
2615
|
}
|
2606
2616
|
},
|
@@ -2804,7 +2814,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2804
2814
|
_getDimension = function(t, p, cs) {
|
2805
2815
|
if ((t.nodeName + "").toLowerCase() === "svg") { //Chrome no longer supports offsetWidth/offsetHeight on SVG elements.
|
2806
2816
|
return (cs || _getComputedStyle(t))[p] || 0;
|
2807
|
-
} else if (t.
|
2817
|
+
} else if (t.getCTM && _isSVG(t)) {
|
2808
2818
|
return t.getBBox()[p] || 0;
|
2809
2819
|
}
|
2810
2820
|
var v = parseFloat((p === "width") ? t.offsetWidth : t.offsetHeight),
|
@@ -3684,7 +3694,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3684
3694
|
|
3685
3695
|
|
3686
3696
|
//transform-related methods and properties
|
3687
|
-
CSSPlugin.useSVGTransformAttr =
|
3697
|
+
CSSPlugin.useSVGTransformAttr = true; //Safari and Firefox both have some rendering bugs when applying CSS transforms to SVG elements, so default to using the "transform" attribute instead (users can override this).
|
3688
3698
|
var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent").split(","),
|
3689
3699
|
_transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform.
|
3690
3700
|
_transformPropCSS = _prefixCSS + "transform",
|
@@ -3694,7 +3704,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3694
3704
|
this.perspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0;
|
3695
3705
|
this.force3D = (CSSPlugin.defaultForce3D === false || !_supports3D) ? false : CSSPlugin.defaultForce3D || "auto";
|
3696
3706
|
},
|
3697
|
-
_SVGElement =
|
3707
|
+
_SVGElement = _gsScope.SVGElement,
|
3698
3708
|
_useSVGTransformAttr,
|
3699
3709
|
//Some browsers (like Firefox and IE) don't honor transform-origin properly in SVG elements, so we need to manually adjust the matrix accordingly. We feature detect here rather than always doing the conversion for certain browsers because they may fix the problem at some point in the future.
|
3700
3710
|
|
@@ -3708,10 +3718,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3708
3718
|
container.appendChild(element);
|
3709
3719
|
return element;
|
3710
3720
|
},
|
3711
|
-
_docElement = _doc.documentElement,
|
3721
|
+
_docElement = _doc.documentElement || {},
|
3712
3722
|
_forceSVGTransformAttr = (function() {
|
3713
3723
|
//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
|
3714
|
-
var force = _ieVers || (/Android/i.test(_agent) && !
|
3724
|
+
var force = _ieVers || (/Android/i.test(_agent) && !_gsScope.chrome),
|
3715
3725
|
svg, rect, width;
|
3716
3726
|
if (_doc.createElementNS && !force) { //IE8 and earlier doesn't support SVG anyway
|
3717
3727
|
svg = _createSVG("svg", _docElement);
|
@@ -3734,6 +3744,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3734
3744
|
}
|
3735
3745
|
if (!absolute || (v = absolute.split(" ")).length < 2) {
|
3736
3746
|
b = e.getBBox();
|
3747
|
+
if (b.x === 0 && b.y === 0 && b.width + b.height === 0) { //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case.
|
3748
|
+
b = {x: parseFloat(e.hasAttribute("x") ? e.getAttribute("x") : e.hasAttribute("cx") ? e.getAttribute("cx") : 0) || 0, y: parseFloat(e.hasAttribute("y") ? e.getAttribute("y") : e.hasAttribute("cy") ? e.getAttribute("cy") : 0) || 0, width:0, height:0};
|
3749
|
+
}
|
3737
3750
|
local = _parsePosition(local).split(" ");
|
3738
3751
|
v = [(local[0].indexOf("%") !== -1 ? parseFloat(local[0]) / 100 * b.width : parseFloat(local[0])) + b.x,
|
3739
3752
|
(local[1].indexOf("%") !== -1 ? parseFloat(local[1]) / 100 * b.height : parseFloat(local[1])) + b.y];
|
@@ -3748,10 +3761,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3748
3761
|
tx = m[4];
|
3749
3762
|
ty = m[5];
|
3750
3763
|
determinant = (a * d - b * c);
|
3751
|
-
|
3752
|
-
|
3753
|
-
|
3754
|
-
|
3764
|
+
if (determinant) { //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero.
|
3765
|
+
x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + ((c * ty - d * tx) / determinant);
|
3766
|
+
y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - ((a * ty - b * tx) / determinant);
|
3767
|
+
xOrigin = decoratee.xOrigin = v[0] = x;
|
3768
|
+
yOrigin = decoratee.yOrigin = v[1] = y;
|
3769
|
+
}
|
3755
3770
|
}
|
3756
3771
|
if (tm) { //avoid jump when transformOrigin is changed - adjust the x/y values accordingly
|
3757
3772
|
if (skipRecord) {
|
@@ -3775,13 +3790,42 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3775
3790
|
e.setAttribute("data-svg-origin", v.join(" "));
|
3776
3791
|
}
|
3777
3792
|
},
|
3778
|
-
|
3793
|
+
_getBBoxHack = function(swapIfPossible) { //works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a <defs> element and/or <mask>. We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it).
|
3794
|
+
var svg = _createElement("svg", this.ownerSVGElement.getAttribute("xmlns") || "http://www.w3.org/2000/svg"),
|
3795
|
+
oldParent = this.parentNode,
|
3796
|
+
oldSibling = this.nextSibling,
|
3797
|
+
oldCSS = this.style.cssText,
|
3798
|
+
bbox;
|
3799
|
+
_docElement.appendChild(svg);
|
3800
|
+
svg.appendChild(this);
|
3801
|
+
this.style.display = "block";
|
3802
|
+
if (swapIfPossible) {
|
3803
|
+
try {
|
3804
|
+
bbox = this.getBBox();
|
3805
|
+
this._originalGetBBox = this.getBBox;
|
3806
|
+
this.getBBox = _getBBoxHack;
|
3807
|
+
} catch (e) { }
|
3808
|
+
} else if (this._originalGetBBox) {
|
3809
|
+
bbox = this._originalGetBBox();
|
3810
|
+
}
|
3811
|
+
if (oldSibling) {
|
3812
|
+
oldParent.insertBefore(this, oldSibling);
|
3813
|
+
} else {
|
3814
|
+
oldParent.appendChild(this);
|
3815
|
+
}
|
3816
|
+
_docElement.removeChild(svg);
|
3817
|
+
this.style.cssText = oldCSS;
|
3818
|
+
return bbox;
|
3819
|
+
},
|
3820
|
+
_getBBox = function(e) {
|
3779
3821
|
try {
|
3780
3822
|
return e.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a <symbol> or <defs>). https://bugzilla.mozilla.org/show_bug.cgi?id=612118
|
3781
|
-
} catch (
|
3823
|
+
} catch (error) {
|
3824
|
+
return _getBBoxHack.call(e, true);
|
3825
|
+
}
|
3782
3826
|
},
|
3783
3827
|
_isSVG = function(e) { //reports if the element is an SVG on which getBBox() actually works
|
3784
|
-
return !!(_SVGElement && e.
|
3828
|
+
return !!(_SVGElement && e.getCTM && _getBBox(e) && (!e.parentNode || e.ownerSVGElement));
|
3785
3829
|
},
|
3786
3830
|
_identity2DMatrix = [1,0,0,1,0,0],
|
3787
3831
|
_getMatrix = function(e, force2D) {
|
@@ -3817,7 +3861,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3817
3861
|
_docElement.removeChild(e);
|
3818
3862
|
}
|
3819
3863
|
}
|
3820
|
-
if (tm.svg || (e.
|
3864
|
+
if (tm.svg || (e.getCTM && _isSVG(e))) {
|
3821
3865
|
if (isDefault && (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
|
3822
3866
|
s = style[_transformProp];
|
3823
3867
|
isDefault = 0;
|
@@ -3866,7 +3910,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3866
3910
|
defaultTransformPerspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0,
|
3867
3911
|
m, i, scaleX, scaleY, rotation, skewX;
|
3868
3912
|
|
3869
|
-
tm.svg = !!(t.
|
3913
|
+
tm.svg = !!(t.getCTM && _isSVG(t));
|
3870
3914
|
if (tm.svg) {
|
3871
3915
|
_parseSVGOrigin(t, _getStyle(t, _transformOriginProp, cs, false, "50% 50%") + "", tm, t.getAttribute("data-svg-origin"));
|
3872
3916
|
_useSVGTransformAttr = CSSPlugin.useSVGTransformAttr || _forceSVGTransformAttr;
|
@@ -4132,27 +4176,34 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4132
4176
|
isSVG = t.svg,
|
4133
4177
|
perspective = t.perspective,
|
4134
4178
|
force3D = t.force3D,
|
4135
|
-
|
4136
|
-
|
4179
|
+
skewY = t.skewY,
|
4180
|
+
skewX = t.skewX,
|
4181
|
+
t1, a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43,
|
4182
|
+
zOrigin, min, cos, sin, t2, transform, comma, zero, skew, rnd;
|
4183
|
+
if (skewY) { //for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees.
|
4184
|
+
skewX += skewY;
|
4185
|
+
angle += skewY;
|
4186
|
+
}
|
4187
|
+
|
4137
4188
|
//check to see if we should render as 2D (and SVGs must use 2D when _useSVGTransformAttr is true)
|
4138
4189
|
if (((((v === 1 || v === 0) && force3D === "auto" && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !force3D) && !z && !perspective && !rotationY && !rotationX && sz === 1) || (_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.
|
4139
4190
|
|
4140
4191
|
//2D
|
4141
|
-
if (angle ||
|
4192
|
+
if (angle || skewX || isSVG) {
|
4142
4193
|
angle *= _DEG2RAD;
|
4143
|
-
skew =
|
4194
|
+
skew = skewX * _DEG2RAD;
|
4144
4195
|
rnd = 100000;
|
4145
4196
|
a11 = Math.cos(angle) * sx;
|
4146
4197
|
a21 = Math.sin(angle) * sx;
|
4147
4198
|
a12 = Math.sin(angle - skew) * -sy;
|
4148
4199
|
a22 = Math.cos(angle - skew) * sy;
|
4149
4200
|
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
|
4150
|
-
t1 = Math.tan(skew -
|
4201
|
+
t1 = Math.tan(skew - skewY * _DEG2RAD);
|
4151
4202
|
t1 = Math.sqrt(1 + t1 * t1);
|
4152
4203
|
a12 *= t1;
|
4153
4204
|
a22 *= t1;
|
4154
|
-
if (
|
4155
|
-
t1 = Math.tan(
|
4205
|
+
if (skewY) {
|
4206
|
+
t1 = Math.tan(skewY * _DEG2RAD);
|
4156
4207
|
t1 = Math.sqrt(1 + t1 * t1);
|
4157
4208
|
a11 *= t1;
|
4158
4209
|
a21 *= t1;
|
@@ -4199,21 +4250,21 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4199
4250
|
perspective = 0;
|
4200
4251
|
}
|
4201
4252
|
}
|
4202
|
-
if (angle ||
|
4253
|
+
if (angle || skewX) {
|
4203
4254
|
angle *= _DEG2RAD;
|
4204
4255
|
cos = a11 = Math.cos(angle);
|
4205
4256
|
sin = a21 = Math.sin(angle);
|
4206
|
-
if (
|
4207
|
-
angle -=
|
4257
|
+
if (skewX) {
|
4258
|
+
angle -= skewX * _DEG2RAD;
|
4208
4259
|
cos = Math.cos(angle);
|
4209
4260
|
sin = Math.sin(angle);
|
4210
4261
|
if (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
|
4211
|
-
t1 = Math.tan((
|
4262
|
+
t1 = Math.tan((skewX - skewY) * _DEG2RAD);
|
4212
4263
|
t1 = Math.sqrt(1 + t1 * t1);
|
4213
4264
|
cos *= t1;
|
4214
4265
|
sin *= t1;
|
4215
4266
|
if (t.skewY) {
|
4216
|
-
t1 = Math.tan(
|
4267
|
+
t1 = Math.tan(skewY * _DEG2RAD);
|
4217
4268
|
t1 = Math.sqrt(1 + t1 * t1);
|
4218
4269
|
a11 *= t1;
|
4219
4270
|
a21 *= t1;
|
@@ -4347,11 +4398,15 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4347
4398
|
_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,smoothOrigin", {parser:function(t, e, parsingProp, cssp, pt, plugin, vars) {
|
4348
4399
|
if (cssp._lastParsedTransform === vars) { return pt; } //only need to parse the transform once, and only if the browser supports it.
|
4349
4400
|
cssp._lastParsedTransform = vars;
|
4350
|
-
var
|
4401
|
+
var scaleFunc = (vars.scale && typeof(vars.scale) === "function") ? vars.scale : 0, //if there's a function-based "scale" value, swap in the resulting numeric value temporarily. Otherwise, if it's called for both scaleX and scaleY independently, they may not match (like if the function uses Math.random()).
|
4402
|
+
swapFunc;
|
4351
4403
|
if (typeof(vars[parsingProp]) === "function") { //whatever property triggers the initial parsing might be a function-based value in which case it already got called in parse(), thus we don't want to call it again in here. The most efficient way to avoid this is to temporarily swap the value directly into the vars object, and then after we do all our parsing in this function, we'll swap it back again.
|
4352
4404
|
swapFunc = vars[parsingProp];
|
4353
4405
|
vars[parsingProp] = e;
|
4354
4406
|
}
|
4407
|
+
if (scaleFunc) {
|
4408
|
+
vars.scale = scaleFunc(_index, t);
|
4409
|
+
}
|
4355
4410
|
var originalGSTransform = t._gsTransform,
|
4356
4411
|
style = t.style,
|
4357
4412
|
min = 0.000001,
|
@@ -4428,18 +4483,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4428
4483
|
m2.yPercent = _parseVal(v.y, m1.yPercent);
|
4429
4484
|
}
|
4430
4485
|
|
4431
|
-
m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation
|
4486
|
+
m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation, m1.rotation, "rotation", endRotations);
|
4432
4487
|
if (_supports3D) {
|
4433
4488
|
m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations);
|
4434
4489
|
m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations);
|
4435
4490
|
}
|
4436
|
-
m2.skewX = _parseAngle(v.skewX, m1.skewX
|
4437
|
-
|
4438
|
-
//note: for performance reasons, we combine all skewing into the skewX and rotation values, ignoring skewY but we must still record it so that we can discern how much of the overall skew is attributed to skewX vs. skewY. Otherwise, if the skewY would always act relative (tween skewY to 10deg, for example, multiple times and if we always combine things into skewX, we can't remember that skewY was 10 from last time). Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of -10 degrees.
|
4439
|
-
if ((m2.skewY = _parseAngle(v.skewY, m1.skewY))) {
|
4440
|
-
m2.skewX += m2.skewY;
|
4441
|
-
m2.rotation += m2.skewY;
|
4442
|
-
}
|
4491
|
+
m2.skewX = _parseAngle(v.skewX, m1.skewX);
|
4492
|
+
m2.skewY = _parseAngle(v.skewY, m1.skewY);
|
4443
4493
|
}
|
4444
4494
|
if (_supports3D && v.force3D != null) {
|
4445
4495
|
m1.force3D = v.force3D;
|
@@ -4479,7 +4529,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4479
4529
|
pt = _addNonTweeningNumericPT(m1, "xOffset", (originalGSTransform ? x : m1.xOffset), m1.xOffset, pt, transformOriginString);
|
4480
4530
|
pt = _addNonTweeningNumericPT(m1, "yOffset", (originalGSTransform ? y : m1.yOffset), m1.yOffset, pt, transformOriginString);
|
4481
4531
|
}
|
4482
|
-
orig =
|
4532
|
+
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
|
4483
4533
|
}
|
4484
4534
|
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).
|
4485
4535
|
if (_transformProp) {
|
@@ -4512,6 +4562,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4512
4562
|
if (swapFunc) {
|
4513
4563
|
vars[parsingProp] = swapFunc;
|
4514
4564
|
}
|
4565
|
+
if (scaleFunc) {
|
4566
|
+
vars.scale = scaleFunc;
|
4567
|
+
}
|
4515
4568
|
return pt;
|
4516
4569
|
}, prefix:true});
|
4517
4570
|
|
@@ -5895,6 +5948,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
5895
5948
|
|
5896
5949
|
"use strict";
|
5897
5950
|
var _exports = {},
|
5951
|
+
_doc = window.document,
|
5898
5952
|
_globals = window.GreenSockGlobals = window.GreenSockGlobals || window;
|
5899
5953
|
if (_globals.TweenLite) {
|
5900
5954
|
return; //in case the core set of classes is already loaded, don't instantiate twice.
|
@@ -6271,7 +6325,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6271
6325
|
|
6272
6326
|
//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.
|
6273
6327
|
setTimeout(function() {
|
6274
|
-
if (_useRAF === "auto" && _self.frame < 5 &&
|
6328
|
+
if (_useRAF === "auto" && _self.frame < 5 && _doc.visibilityState !== "hidden") {
|
6275
6329
|
_self.useRAF(false);
|
6276
6330
|
}
|
6277
6331
|
}, 1500);
|
@@ -6383,7 +6437,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6383
6437
|
var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active.
|
6384
6438
|
startTime = this._startTime,
|
6385
6439
|
rawTime;
|
6386
|
-
return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime()) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale));
|
6440
|
+
return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime(true)) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale));
|
6387
6441
|
};
|
6388
6442
|
|
6389
6443
|
p._enabled = function (enabled, ignoreTimeline) {
|
@@ -6827,7 +6881,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6827
6881
|
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
6828
6882
|
p._notifyPluginsOfEnabled = p._lazy = false;
|
6829
6883
|
|
6830
|
-
TweenLite.version = "1.19.
|
6884
|
+
TweenLite.version = "1.19.1";
|
6831
6885
|
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
6832
6886
|
TweenLite.defaultOverwrite = "auto";
|
6833
6887
|
TweenLite.ticker = _ticker;
|
@@ -6842,7 +6896,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6842
6896
|
TweenLite.selector = selector;
|
6843
6897
|
return selector(e);
|
6844
6898
|
}
|
6845
|
-
return (typeof(
|
6899
|
+
return (typeof(_doc) === "undefined") ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));
|
6846
6900
|
};
|
6847
6901
|
|
6848
6902
|
var _lazyTweens = [],
|
@@ -6854,10 +6908,10 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6854
6908
|
min = 0.000001,
|
6855
6909
|
val;
|
6856
6910
|
while (pt) {
|
6857
|
-
val = !pt.blob ? pt.c * v + pt.s : v ? this.join("") : this.start;
|
6911
|
+
val = !pt.blob ? pt.c * v + pt.s : (v === 1) ? this.end : v ? this.join("") : this.start;
|
6858
6912
|
if (pt.m) {
|
6859
6913
|
val = pt.m(val, this._target || pt.t);
|
6860
|
-
} else if (val < min) if (val > -min) { //prevents issues with converting very small numbers to strings in the browser
|
6914
|
+
} else if (val < min) if (val > -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browser
|
6861
6915
|
val = 0;
|
6862
6916
|
}
|
6863
6917
|
if (!pt.f) {
|
@@ -6872,12 +6926,15 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6872
6926
|
},
|
6873
6927
|
//compares two strings (start/end), finds the numbers that are different and spits back an array representing the whole value but with the changing values isolated as elements. For example, "rgb(0,0,0)" and "rgb(100,50,0)" would become ["rgb(", 0, ",", 50, ",0)"]. Notice it merges the parts that are identical (performance optimization). The array also has a linked list of PropTweens attached starting with _firstPT that contain the tweening data (t, p, s, c, f, etc.). It also stores the starting value as a "start" property so that we can revert to it if/when necessary, like when a tween rewinds fully. If the quantity of numbers differs between the start and end, it will always prioritize the end value(s). The pt parameter is optional - it's for a PropTween that will be appended to the end of the linked list and is typically for actually setting the value after all of the elements have been updated (with array.join("")).
|
6874
6928
|
_blobDif = function(start, end, filter, pt) {
|
6875
|
-
var a = [
|
6929
|
+
var a = [],
|
6876
6930
|
charIndex = 0,
|
6877
6931
|
s = "",
|
6878
6932
|
color = 0,
|
6879
6933
|
startNums, endNums, num, i, l, nonNumbers, currentNum;
|
6880
6934
|
a.start = start;
|
6935
|
+
a.end = end;
|
6936
|
+
start = a[0] = start + ""; //ensure values are strings
|
6937
|
+
end = a[1] = end + "";
|
6881
6938
|
if (filter) {
|
6882
6939
|
filter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values.
|
6883
6940
|
start = a[0];
|
@@ -6928,24 +6985,24 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6928
6985
|
if (typeof(end) === "function") {
|
6929
6986
|
end = end(index || 0, target);
|
6930
6987
|
}
|
6931
|
-
var
|
6932
|
-
|
6988
|
+
var type = typeof(target[prop]),
|
6989
|
+
getterName = (type !== "function") ? "" : ((prop.indexOf("set") || typeof(target["get" + prop.substr(3)]) !== "function") ? prop : "get" + prop.substr(3)),
|
6990
|
+
s = (start !== "get") ? start : !getterName ? target[prop] : funcParam ? target[getterName](funcParam) : target[getterName](),
|
6933
6991
|
isRelative = (typeof(end) === "string" && end.charAt(1) === "="),
|
6934
6992
|
pt = {t:target, p:prop, s:s, f:(type === "function"), pg:0, n:overwriteProp || prop, m:(!mod ? 0 : (typeof(mod) === "function") ? mod : Math.round), pr:0, c:isRelative ? parseInt(end.charAt(0) + "1", 10) * parseFloat(end.substr(2)) : (parseFloat(end) - s) || 0},
|
6935
|
-
blob
|
6936
|
-
|
6937
|
-
|
6938
|
-
|
6939
|
-
pt.s = s = funcParam ? target[getterName](funcParam) : target[getterName]();
|
6940
|
-
}
|
6941
|
-
if (typeof(s) === "string" && (funcParam || isNaN(s))) {
|
6993
|
+
blob;
|
6994
|
+
|
6995
|
+
if (typeof(s) !== "number" || (typeof(end) !== "number" && !isRelative)) {
|
6996
|
+
if (funcParam || isNaN(s) || (!isRelative && isNaN(end)) || typeof(s) === "boolean" || typeof(end) === "boolean") {
|
6942
6997
|
//a blob (string that has multiple numbers in it)
|
6943
6998
|
pt.fp = funcParam;
|
6944
|
-
blob = _blobDif(s, end, stringFilter || TweenLite.defaultStringFilter, pt);
|
6945
|
-
pt = {t:blob, p:"setRatio", s:0, c:1, f:2, pg:0, n:overwriteProp || prop, pr:0, m:0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example.
|
6946
|
-
} else
|
6999
|
+
blob = _blobDif(s, (isRelative ? pt.s + pt.c : end), stringFilter || TweenLite.defaultStringFilter, pt);
|
7000
|
+
pt = {t: blob, p: "setRatio", s: 0, c: 1, f: 2, pg: 0, n: overwriteProp || prop, pr: 0, m: 0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example.
|
7001
|
+
} else {
|
6947
7002
|
pt.s = parseFloat(s);
|
6948
|
-
|
7003
|
+
if (!isRelative) {
|
7004
|
+
pt.c = (parseFloat(end) - pt.s) || 0;
|
7005
|
+
}
|
6949
7006
|
}
|
6950
7007
|
}
|
6951
7008
|
if (pt.c) { //only add it to the linked list if there's a change.
|
@@ -7291,7 +7348,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
7291
7348
|
duration = this._duration,
|
7292
7349
|
prevRawPrevTime = this._rawPrevTime,
|
7293
7350
|
isComplete, callback, pt, rawPrevTime;
|
7294
|
-
if (time >= duration - 0.0000001) { //to work around occasional floating point math artifacts.
|
7351
|
+
if (time >= duration - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
7295
7352
|
this._totalTime = this._time = duration;
|
7296
7353
|
this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;
|
7297
7354
|
if (!this._reversed ) {
|