greensock-rails 1.20.2.0 → 1.20.3.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 +24 -9
- data/vendor/assets/javascripts/greensock/TimelineMax.js +26 -11
- data/vendor/assets/javascripts/greensock/TweenLite.js +24 -12
- data/vendor/assets/javascripts/greensock/TweenMax.js +72 -35
- data/vendor/assets/javascripts/greensock/easing/EasePack.js +1 -1
- data/vendor/assets/javascripts/greensock/plugins/CSSPlugin.js +14 -9
- data/vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js +4 -4
- data/vendor/assets/javascripts/greensock/plugins/PixiPlugin.js +11 -4
- data/vendor/assets/javascripts/greensock/plugins/TextPlugin.js +11 -3
- data/vendor/assets/javascripts/greensock/utils/Draggable.js +69 -36
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2cecef6361c91a71e4d37f69b2b17191d33f94f
|
4
|
+
data.tar.gz: 64cbfae4cabe48cfcb905dd2ab7930c7e54cd622
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d197ebec7cf91617bbd69a9dc05af83000845e7e328fd7f8c53e0c0c0f870774c0272bf08de6b7b331a4692d0960a124b28276ba9c3966788c97cc27b0af043
|
7
|
+
data.tar.gz: 8cb4db8dcb1965e6bc19d034b79e091694d318efc798bd0f65c0b7c0c9e8bac0b3c7154d0e95a58d72a4b9a39d087ea00a7ff3a9fd350d9c35b5589ab8ef545c
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.20.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 1.20.3
|
3
|
+
* DATE: 2017-10-02
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -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.20.
|
72
|
+
TimelineLite.version = "1.20.3";
|
73
73
|
p.constructor = TimelineLite;
|
74
74
|
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
75
75
|
|
@@ -177,7 +177,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
177
177
|
}
|
178
178
|
var tl = new TimelineLite(vars),
|
179
179
|
root = tl._timeline,
|
180
|
-
tween, next;
|
180
|
+
hasNegativeStart, time, tween, next;
|
181
181
|
if (ignoreDelayedCalls == null) {
|
182
182
|
ignoreDelayedCalls = true;
|
183
183
|
}
|
@@ -188,11 +188,18 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
188
188
|
while (tween) {
|
189
189
|
next = tween._next;
|
190
190
|
if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) {
|
191
|
-
|
191
|
+
time = tween._startTime - tween._delay;
|
192
|
+
if (time < 0) {
|
193
|
+
hasNegativeStart = 1;
|
194
|
+
}
|
195
|
+
tl.add(tween, time);
|
192
196
|
}
|
193
197
|
tween = next;
|
194
198
|
}
|
195
199
|
root.add(tl, 0);
|
200
|
+
if (hasNegativeStart) { //calling totalDuration() will force the adjustment necessary to shift the children forward so none of them start before zero, and moves the timeline backwards the same amount, so the playhead is still aligned where it should be globally, but the timeline doesn't have illegal children that start before zero.
|
201
|
+
tl.totalDuration();
|
202
|
+
}
|
196
203
|
return tl;
|
197
204
|
};
|
198
205
|
|
@@ -332,7 +339,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
332
339
|
}
|
333
340
|
}
|
334
341
|
}
|
335
|
-
clippedDuration = (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.
|
342
|
+
clippedDuration = (typeof(timeOrLabel) === "number" && !offsetOrLabel) ? 0 : (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.
|
336
343
|
if (typeof(offsetOrLabel) === "string") {
|
337
344
|
return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - clippedDuration : 0, appendIfAbsent);
|
338
345
|
}
|
@@ -373,12 +380,15 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
373
380
|
if (this._gc) {
|
374
381
|
this._enabled(true, false);
|
375
382
|
}
|
376
|
-
var
|
377
|
-
|
383
|
+
var prevTime = this._time,
|
384
|
+
totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),
|
378
385
|
prevStart = this._startTime,
|
379
386
|
prevTimeScale = this._timeScale,
|
380
387
|
prevPaused = this._paused,
|
381
388
|
tween, isComplete, next, callback, internalForce, pauseTween, curTime;
|
389
|
+
if (prevTime !== this._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
|
390
|
+
time += this._time - prevTime;
|
391
|
+
}
|
382
392
|
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
383
393
|
this._totalTime = this._time = totalDur;
|
384
394
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
@@ -711,8 +721,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
711
721
|
if (tween._dirty) {
|
712
722
|
tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it.
|
713
723
|
}
|
714
|
-
if (tween._startTime > prevStart && this._sortChildren && !tween._paused) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence
|
724
|
+
if (tween._startTime > prevStart && this._sortChildren && !tween._paused && !this._calculatingDuration) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence
|
725
|
+
this._calculatingDuration = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(), like _parseTimeOrLabel().
|
715
726
|
this.add(tween, tween._startTime - tween._delay);
|
727
|
+
this._calculatingDuration = 0;
|
716
728
|
} else {
|
717
729
|
prevStart = tween._startTime;
|
718
730
|
}
|
@@ -720,6 +732,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
720
732
|
max -= tween._startTime;
|
721
733
|
if (this._timeline.smoothChildTiming) {
|
722
734
|
this._startTime += tween._startTime / this._timeScale;
|
735
|
+
this._time -= tween._startTime;
|
736
|
+
this._totalTime -= tween._startTime;
|
737
|
+
this._rawPrevTime -= tween._startTime;
|
723
738
|
}
|
724
739
|
this.shiftChildren(-tween._startTime, false, -9999999999);
|
725
740
|
prevStart = 0;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.20.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 1.20.3
|
3
|
+
* DATE: 2017-10-02
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, 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.20.
|
37
|
+
TimelineMax.version = "1.20.3";
|
38
38
|
|
39
39
|
p.invalidate = function() {
|
40
40
|
this._yoyo = (this.vars.yoyo === true);
|
@@ -106,16 +106,19 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
106
106
|
if (this._gc) {
|
107
107
|
this._enabled(true, false);
|
108
108
|
}
|
109
|
-
var
|
109
|
+
var prevTime = this._time,
|
110
|
+
totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),
|
110
111
|
dur = this._duration,
|
111
|
-
|
112
|
-
prevTotalTime = this._totalTime,
|
112
|
+
prevTotalTime = this._totalTime,
|
113
113
|
prevStart = this._startTime,
|
114
114
|
prevTimeScale = this._timeScale,
|
115
115
|
prevRawPrevTime = this._rawPrevTime,
|
116
116
|
prevPaused = this._paused,
|
117
117
|
prevCycle = this._cycle,
|
118
118
|
tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime;
|
119
|
+
if (prevTime !== this._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
|
120
|
+
time += this._time - prevTime;
|
121
|
+
}
|
119
122
|
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
120
123
|
if (!this._locked) {
|
121
124
|
this._totalTime = totalDur;
|
@@ -584,7 +587,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
584
587
|
},
|
585
588
|
p = TimelineLite.prototype = new SimpleTimeline();
|
586
589
|
|
587
|
-
TimelineLite.version = "1.20.
|
590
|
+
TimelineLite.version = "1.20.3";
|
588
591
|
p.constructor = TimelineLite;
|
589
592
|
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
590
593
|
|
@@ -692,7 +695,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
692
695
|
}
|
693
696
|
var tl = new TimelineLite(vars),
|
694
697
|
root = tl._timeline,
|
695
|
-
tween, next;
|
698
|
+
hasNegativeStart, time, tween, next;
|
696
699
|
if (ignoreDelayedCalls == null) {
|
697
700
|
ignoreDelayedCalls = true;
|
698
701
|
}
|
@@ -703,11 +706,18 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
703
706
|
while (tween) {
|
704
707
|
next = tween._next;
|
705
708
|
if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) {
|
706
|
-
|
709
|
+
time = tween._startTime - tween._delay;
|
710
|
+
if (time < 0) {
|
711
|
+
hasNegativeStart = 1;
|
712
|
+
}
|
713
|
+
tl.add(tween, time);
|
707
714
|
}
|
708
715
|
tween = next;
|
709
716
|
}
|
710
717
|
root.add(tl, 0);
|
718
|
+
if (hasNegativeStart) { //calling totalDuration() will force the adjustment necessary to shift the children forward so none of them start before zero, and moves the timeline backwards the same amount, so the playhead is still aligned where it should be globally, but the timeline doesn't have illegal children that start before zero.
|
719
|
+
tl.totalDuration();
|
720
|
+
}
|
711
721
|
return tl;
|
712
722
|
};
|
713
723
|
|
@@ -847,7 +857,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
847
857
|
}
|
848
858
|
}
|
849
859
|
}
|
850
|
-
clippedDuration = (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.
|
860
|
+
clippedDuration = (typeof(timeOrLabel) === "number" && !offsetOrLabel) ? 0 : (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.
|
851
861
|
if (typeof(offsetOrLabel) === "string") {
|
852
862
|
return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - clippedDuration : 0, appendIfAbsent);
|
853
863
|
}
|
@@ -1226,8 +1236,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1226
1236
|
if (tween._dirty) {
|
1227
1237
|
tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it.
|
1228
1238
|
}
|
1229
|
-
if (tween._startTime > prevStart && this._sortChildren && !tween._paused) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence
|
1239
|
+
if (tween._startTime > prevStart && this._sortChildren && !tween._paused && !this._calculatingDuration) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence
|
1240
|
+
this._calculatingDuration = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(), like _parseTimeOrLabel().
|
1230
1241
|
this.add(tween, tween._startTime - tween._delay);
|
1242
|
+
this._calculatingDuration = 0;
|
1231
1243
|
} else {
|
1232
1244
|
prevStart = tween._startTime;
|
1233
1245
|
}
|
@@ -1235,6 +1247,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1235
1247
|
max -= tween._startTime;
|
1236
1248
|
if (this._timeline.smoothChildTiming) {
|
1237
1249
|
this._startTime += tween._startTime / this._timeScale;
|
1250
|
+
this._time -= tween._startTime;
|
1251
|
+
this._totalTime -= tween._startTime;
|
1252
|
+
this._rawPrevTime -= tween._startTime;
|
1238
1253
|
}
|
1239
1254
|
this.shiftChildren(-tween._startTime, false, -9999999999);
|
1240
1255
|
prevStart = 0;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.20.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 1.20.3
|
3
|
+
* DATE: 2017-10-02
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -331,6 +331,9 @@
|
|
331
331
|
};
|
332
332
|
|
333
333
|
_self.lagSmoothing = function(threshold, adjustedLag) {
|
334
|
+
if (!arguments.length) { //if lagSmoothing() is called with no arguments, treat it like a getter that returns a boolean indicating if it's enabled or not. This is purposely undocumented and is for internal use.
|
335
|
+
return (_lagThreshold < 1 / _tinyNum);
|
336
|
+
}
|
334
337
|
_lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited
|
335
338
|
_adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);
|
336
339
|
};
|
@@ -438,7 +441,7 @@
|
|
438
441
|
|
439
442
|
//some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.
|
440
443
|
var _checkTimeout = function() {
|
441
|
-
if (_tickerActive && _getTime() - _lastUpdate > 2000 && _doc.visibilityState !== "hidden") {
|
444
|
+
if (_tickerActive && _getTime() - _lastUpdate > 2000 && (_doc.visibilityState !== "hidden" || !_ticker.lagSmoothing())) { //note: if the tab is hidden, we should still wake if lagSmoothing has been disabled.
|
442
445
|
_ticker.wake();
|
443
446
|
}
|
444
447
|
var t = setTimeout(_checkTimeout, 2000);
|
@@ -704,14 +707,21 @@
|
|
704
707
|
if (!arguments.length) {
|
705
708
|
return this._timeScale;
|
706
709
|
}
|
710
|
+
var pauseTime, t;
|
707
711
|
value = value || _tinyNum; //can't allow zero because it'll throw the math off
|
708
712
|
if (this._timeline && this._timeline.smoothChildTiming) {
|
709
|
-
|
710
|
-
|
713
|
+
pauseTime = this._pauseTime;
|
714
|
+
t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime();
|
711
715
|
this._startTime = t - ((t - this._startTime) * this._timeScale / value);
|
712
716
|
}
|
713
717
|
this._timeScale = value;
|
714
|
-
|
718
|
+
t = this.timeline;
|
719
|
+
while (t && t.timeline) { //must update the duration/totalDuration of all ancestor timelines immediately in case in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though.
|
720
|
+
t._dirty = true;
|
721
|
+
t.totalDuration();
|
722
|
+
t = t.timeline;
|
723
|
+
}
|
724
|
+
return this;
|
715
725
|
};
|
716
726
|
|
717
727
|
p.reversed = function(value) {
|
@@ -948,7 +958,7 @@
|
|
948
958
|
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
949
959
|
p._notifyPluginsOfEnabled = p._lazy = false;
|
950
960
|
|
951
|
-
TweenLite.version = "1.20.
|
961
|
+
TweenLite.version = "1.20.3";
|
952
962
|
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
953
963
|
TweenLite.defaultOverwrite = "auto";
|
954
964
|
TweenLite.ticker = _ticker;
|
@@ -976,7 +986,7 @@
|
|
976
986
|
min = 0.000001,
|
977
987
|
val;
|
978
988
|
while (pt) {
|
979
|
-
val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end) ? this.end : v ? this.join("") : this.start;
|
989
|
+
val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end != null) ? this.end : v ? this.join("") : this.start;
|
980
990
|
if (pt.m) {
|
981
991
|
val = pt.m(val, this._target || pt.t);
|
982
992
|
} else if (val < min) if (val > -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browser
|
@@ -1047,7 +1057,7 @@
|
|
1047
1057
|
}
|
1048
1058
|
a.setRatio = _setRatio;
|
1049
1059
|
if (_relExp.test(end)) { //if the end string contains relative values, delete it so that on the final render (in _setRatio()), we don't actually set it to the string with += or -= characters (forces it to use the calculated value).
|
1050
|
-
a.end =
|
1060
|
+
a.end = null;
|
1051
1061
|
}
|
1052
1062
|
return a;
|
1053
1063
|
},
|
@@ -1269,11 +1279,13 @@
|
|
1269
1279
|
for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from);
|
1270
1280
|
startVars[p] = v.startAt[p];
|
1271
1281
|
}
|
1282
|
+
startVars.data = "isStart";
|
1272
1283
|
startVars.overwrite = false;
|
1273
1284
|
startVars.immediateRender = true;
|
1274
1285
|
startVars.lazy = (immediate && v.lazy !== false);
|
1275
1286
|
startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop).
|
1276
1287
|
startVars.onUpdate = v.onUpdate;
|
1288
|
+
startVars.onUpdateParams = v.onUpdateParams;
|
1277
1289
|
startVars.onUpdateScope = v.onUpdateScope || v.callbackScope || this;
|
1278
1290
|
this._startAt = TweenLite.to(this.target, 0, startVars);
|
1279
1291
|
if (immediate) {
|
@@ -1526,7 +1538,7 @@
|
|
1526
1538
|
if (prevTime === 0) {
|
1527
1539
|
if (this._startAt) {
|
1528
1540
|
if (time >= 0) {
|
1529
|
-
this._startAt.render(time,
|
1541
|
+
this._startAt.render(time, true, force);
|
1530
1542
|
} else if (!callback) {
|
1531
1543
|
callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.
|
1532
1544
|
}
|
@@ -1547,7 +1559,7 @@
|
|
1547
1559
|
|
1548
1560
|
if (this._onUpdate) {
|
1549
1561
|
if (time < 0) if (this._startAt && time !== -0.0001) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
|
1550
|
-
this._startAt.render(time,
|
1562
|
+
this._startAt.render(time, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.
|
1551
1563
|
}
|
1552
1564
|
if (!suppressEvents) if (this._time !== prevTime || isComplete || force) {
|
1553
1565
|
this._callback("onUpdate");
|
@@ -1555,7 +1567,7 @@
|
|
1555
1567
|
}
|
1556
1568
|
if (callback) if (!this._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate
|
1557
1569
|
if (time < 0 && this._startAt && !this._onUpdate && time !== -0.0001) { //-0.0001 is a special value that we use when looping back to the beginning of a repeated TimelineMax, in which case we shouldn't render the _startAt values.
|
1558
|
-
this._startAt.render(time,
|
1570
|
+
this._startAt.render(time, true, force);
|
1559
1571
|
}
|
1560
1572
|
if (isComplete) {
|
1561
1573
|
if (this._timeline.autoRemoveChildren) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.20.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 1.20.3
|
3
|
+
* DATE: 2017-10-02
|
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
|
@@ -40,7 +40,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
40
40
|
this._yoyo = (this.vars.yoyo === true || !!this.vars.yoyoEase);
|
41
41
|
this._repeat = this.vars.repeat || 0;
|
42
42
|
this._repeatDelay = this.vars.repeatDelay || 0;
|
43
|
-
this.
|
43
|
+
if (this._repeat) {
|
44
|
+
this._uncache(true); //ensures that if there is any repeat, the totalDuration will get recalculated to accurately report it.
|
45
|
+
}
|
44
46
|
this.render = TweenMax.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)
|
45
47
|
},
|
46
48
|
_tinyNum = 0.0000000001,
|
@@ -50,7 +52,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
50
52
|
p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
|
51
53
|
_blankArray = [];
|
52
54
|
|
53
|
-
TweenMax.version = "1.20.
|
55
|
+
TweenMax.version = "1.20.3";
|
54
56
|
p.constructor = TweenMax;
|
55
57
|
p.kill()._gc = false;
|
56
58
|
TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
|
@@ -285,7 +287,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
285
287
|
}
|
286
288
|
if (this._startAt) {
|
287
289
|
if (time >= 0) {
|
288
|
-
this._startAt.render(time,
|
290
|
+
this._startAt.render(time, true, force);
|
289
291
|
} else if (!callback) {
|
290
292
|
callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.
|
291
293
|
}
|
@@ -307,7 +309,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
307
309
|
|
308
310
|
if (this._onUpdate) {
|
309
311
|
if (time < 0) if (this._startAt && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
|
310
|
-
this._startAt.render(time,
|
312
|
+
this._startAt.render(time, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.
|
311
313
|
}
|
312
314
|
if (!suppressEvents) if (this._totalTime !== prevTotalTime || callback) {
|
313
315
|
this._callback("onUpdate");
|
@@ -318,7 +320,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
318
320
|
}
|
319
321
|
if (callback) if (!this._gc || force) { //check gc because there's a chance that kill() could be called in an onUpdate
|
320
322
|
if (time < 0 && this._startAt && !this._onUpdate && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
|
321
|
-
this._startAt.render(time,
|
323
|
+
this._startAt.render(time, true, force);
|
322
324
|
}
|
323
325
|
if (isComplete) {
|
324
326
|
if (this._timeline.autoRemoveChildren) {
|
@@ -700,7 +702,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
700
702
|
},
|
701
703
|
p = TimelineLite.prototype = new SimpleTimeline();
|
702
704
|
|
703
|
-
TimelineLite.version = "1.20.
|
705
|
+
TimelineLite.version = "1.20.3";
|
704
706
|
p.constructor = TimelineLite;
|
705
707
|
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
706
708
|
|
@@ -808,7 +810,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
808
810
|
}
|
809
811
|
var tl = new TimelineLite(vars),
|
810
812
|
root = tl._timeline,
|
811
|
-
tween, next;
|
813
|
+
hasNegativeStart, time, tween, next;
|
812
814
|
if (ignoreDelayedCalls == null) {
|
813
815
|
ignoreDelayedCalls = true;
|
814
816
|
}
|
@@ -819,11 +821,18 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
819
821
|
while (tween) {
|
820
822
|
next = tween._next;
|
821
823
|
if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) {
|
822
|
-
|
824
|
+
time = tween._startTime - tween._delay;
|
825
|
+
if (time < 0) {
|
826
|
+
hasNegativeStart = 1;
|
827
|
+
}
|
828
|
+
tl.add(tween, time);
|
823
829
|
}
|
824
830
|
tween = next;
|
825
831
|
}
|
826
832
|
root.add(tl, 0);
|
833
|
+
if (hasNegativeStart) { //calling totalDuration() will force the adjustment necessary to shift the children forward so none of them start before zero, and moves the timeline backwards the same amount, so the playhead is still aligned where it should be globally, but the timeline doesn't have illegal children that start before zero.
|
834
|
+
tl.totalDuration();
|
835
|
+
}
|
827
836
|
return tl;
|
828
837
|
};
|
829
838
|
|
@@ -963,7 +972,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
963
972
|
}
|
964
973
|
}
|
965
974
|
}
|
966
|
-
clippedDuration = (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.
|
975
|
+
clippedDuration = (typeof(timeOrLabel) === "number" && !offsetOrLabel) ? 0 : (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.
|
967
976
|
if (typeof(offsetOrLabel) === "string") {
|
968
977
|
return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - clippedDuration : 0, appendIfAbsent);
|
969
978
|
}
|
@@ -1004,12 +1013,15 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1004
1013
|
if (this._gc) {
|
1005
1014
|
this._enabled(true, false);
|
1006
1015
|
}
|
1007
|
-
var
|
1008
|
-
|
1016
|
+
var prevTime = this._time,
|
1017
|
+
totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),
|
1009
1018
|
prevStart = this._startTime,
|
1010
1019
|
prevTimeScale = this._timeScale,
|
1011
1020
|
prevPaused = this._paused,
|
1012
1021
|
tween, isComplete, next, callback, internalForce, pauseTween, curTime;
|
1022
|
+
if (prevTime !== this._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
|
1023
|
+
time += this._time - prevTime;
|
1024
|
+
}
|
1013
1025
|
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
1014
1026
|
this._totalTime = this._time = totalDur;
|
1015
1027
|
if (!this._reversed) if (!this._hasPausedChild()) {
|
@@ -1342,8 +1354,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1342
1354
|
if (tween._dirty) {
|
1343
1355
|
tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it.
|
1344
1356
|
}
|
1345
|
-
if (tween._startTime > prevStart && this._sortChildren && !tween._paused) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence
|
1357
|
+
if (tween._startTime > prevStart && this._sortChildren && !tween._paused && !this._calculatingDuration) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence
|
1358
|
+
this._calculatingDuration = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(), like _parseTimeOrLabel().
|
1346
1359
|
this.add(tween, tween._startTime - tween._delay);
|
1360
|
+
this._calculatingDuration = 0;
|
1347
1361
|
} else {
|
1348
1362
|
prevStart = tween._startTime;
|
1349
1363
|
}
|
@@ -1351,6 +1365,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1351
1365
|
max -= tween._startTime;
|
1352
1366
|
if (this._timeline.smoothChildTiming) {
|
1353
1367
|
this._startTime += tween._startTime / this._timeScale;
|
1368
|
+
this._time -= tween._startTime;
|
1369
|
+
this._totalTime -= tween._startTime;
|
1370
|
+
this._rawPrevTime -= tween._startTime;
|
1354
1371
|
}
|
1355
1372
|
this.shiftChildren(-tween._startTime, false, -9999999999);
|
1356
1373
|
prevStart = 0;
|
@@ -1436,7 +1453,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1436
1453
|
|
1437
1454
|
p.constructor = TimelineMax;
|
1438
1455
|
p.kill()._gc = false;
|
1439
|
-
TimelineMax.version = "1.20.
|
1456
|
+
TimelineMax.version = "1.20.3";
|
1440
1457
|
|
1441
1458
|
p.invalidate = function() {
|
1442
1459
|
this._yoyo = (this.vars.yoyo === true);
|
@@ -1508,9 +1525,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1508
1525
|
if (this._gc) {
|
1509
1526
|
this._enabled(true, false);
|
1510
1527
|
}
|
1511
|
-
var
|
1528
|
+
var prevTime = this._time,
|
1529
|
+
totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),
|
1512
1530
|
dur = this._duration,
|
1513
|
-
prevTime = this._time,
|
1514
1531
|
prevTotalTime = this._totalTime,
|
1515
1532
|
prevStart = this._startTime,
|
1516
1533
|
prevTimeScale = this._timeScale,
|
@@ -1518,6 +1535,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1518
1535
|
prevPaused = this._paused,
|
1519
1536
|
prevCycle = this._cycle,
|
1520
1537
|
tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime;
|
1538
|
+
if (prevTime !== this._time) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
|
1539
|
+
time += this._time - prevTime;
|
1540
|
+
}
|
1521
1541
|
if (time >= totalDur - 0.0000001 && time >= 0) { //to work around occasional floating point math artifacts.
|
1522
1542
|
if (!this._locked) {
|
1523
1543
|
this._totalTime = totalDur;
|
@@ -2563,7 +2583,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2563
2583
|
p = CSSPlugin.prototype = new TweenPlugin("css");
|
2564
2584
|
|
2565
2585
|
p.constructor = CSSPlugin;
|
2566
|
-
CSSPlugin.version = "1.20.
|
2586
|
+
CSSPlugin.version = "1.20.3";
|
2567
2587
|
CSSPlugin.API = 2;
|
2568
2588
|
CSSPlugin.defaultTransformPerspective = 0;
|
2569
2589
|
CSSPlugin.defaultSkewType = "compensated";
|
@@ -3030,7 +3050,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3030
3050
|
g = (l <= 0.5) ? l * (s + 1) : l + s - l * s;
|
3031
3051
|
r = l * 2 - g;
|
3032
3052
|
if (a.length > 3) {
|
3033
|
-
a[3] = Number(
|
3053
|
+
a[3] = Number(a[3]);
|
3034
3054
|
}
|
3035
3055
|
a[0] = _hue(h + 1 / 3, r, g);
|
3036
3056
|
a[1] = _hue(h, r, g);
|
@@ -3412,8 +3432,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3412
3432
|
autoRound = (_autoRound !== false),
|
3413
3433
|
i, xi, ni, bv, ev, bnums, enums, bn, hasAlpha, temp, cv, str, useHSL;
|
3414
3434
|
if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) {
|
3415
|
-
|
3416
|
-
|
3435
|
+
if ((e + b).indexOf("rgb") !== -1 || (e + b).indexOf("hsl") !== -1) { //keep rgb(), rgba(), hsl(), and hsla() values together! (remember, we're splitting on spaces)
|
3436
|
+
ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");
|
3437
|
+
ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");
|
3438
|
+
} else {
|
3439
|
+
ba = ba.join(" ").split(",").join(", ").split(" ");
|
3440
|
+
ea = ea.join(" ").split(",").join(", ").split(" ");
|
3441
|
+
}
|
3417
3442
|
l = ba.length;
|
3418
3443
|
}
|
3419
3444
|
if (l !== ea.length) {
|
@@ -3821,7 +3846,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3821
3846
|
}
|
3822
3847
|
},
|
3823
3848
|
_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).
|
3824
|
-
var svg = _createElement("svg", this.ownerSVGElement.getAttribute("xmlns") || "http://www.w3.org/2000/svg"),
|
3849
|
+
var svg = _createElement("svg", (this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns")) || "http://www.w3.org/2000/svg"),
|
3825
3850
|
oldParent = this.parentNode,
|
3826
3851
|
oldSibling = this.nextSibling,
|
3827
3852
|
oldCSS = this.style.cssText,
|
@@ -3855,7 +3880,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3855
3880
|
}
|
3856
3881
|
},
|
3857
3882
|
_isSVG = function(e) { //reports if the element is an SVG on which getBBox() actually works
|
3858
|
-
return !!(_SVGElement && e.getCTM &&
|
3883
|
+
return !!(_SVGElement && e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e));
|
3859
3884
|
},
|
3860
3885
|
_identity2DMatrix = [1,0,0,1,0,0],
|
3861
3886
|
_getMatrix = function(e, force2D) {
|
@@ -3871,7 +3896,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3871
3896
|
s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";
|
3872
3897
|
}
|
3873
3898
|
isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
|
3874
|
-
if (_transformProp && ((none = (_getComputedStyle(e).display === "none")) || !e.parentNode)) {
|
3899
|
+
if (_transformProp && ((none = (!_getComputedStyle(e) || _getComputedStyle(e).display === "none")) || !e.parentNode)) { //note: Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
|
3875
3900
|
if (none) { //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
|
3876
3901
|
n = style.display;
|
3877
3902
|
style.display = "block";
|
@@ -5741,7 +5766,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
5741
5766
|
if (p < this._p1) {
|
5742
5767
|
return this._calcEnd ? 1 - ((p = 1 - (p / this._p1)) * p) : r - ((p = 1 - (p / this._p1)) * p * p * p * r);
|
5743
5768
|
} else if (p > this._p3) {
|
5744
|
-
return this._calcEnd ? 1 - (p = (p - this._p3) / this._p1) * p : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p);
|
5769
|
+
return this._calcEnd ? (p === 1 ? 0 : 1 - (p = (p - this._p3) / this._p1) * p) : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p); //added p === 1 ? 0 to avoid floating point rounding errors from affecting the final value, like 1 - 0.7 = 0.30000000000000004 instead of 0.3
|
5745
5770
|
}
|
5746
5771
|
return this._calcEnd ? 1 : r;
|
5747
5772
|
};
|
@@ -6326,6 +6351,9 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6326
6351
|
};
|
6327
6352
|
|
6328
6353
|
_self.lagSmoothing = function(threshold, adjustedLag) {
|
6354
|
+
if (!arguments.length) { //if lagSmoothing() is called with no arguments, treat it like a getter that returns a boolean indicating if it's enabled or not. This is purposely undocumented and is for internal use.
|
6355
|
+
return (_lagThreshold < 1 / _tinyNum);
|
6356
|
+
}
|
6329
6357
|
_lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited
|
6330
6358
|
_adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);
|
6331
6359
|
};
|
@@ -6433,7 +6461,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6433
6461
|
|
6434
6462
|
//some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.
|
6435
6463
|
var _checkTimeout = function() {
|
6436
|
-
if (_tickerActive && _getTime() - _lastUpdate > 2000 && _doc.visibilityState !== "hidden") {
|
6464
|
+
if (_tickerActive && _getTime() - _lastUpdate > 2000 && (_doc.visibilityState !== "hidden" || !_ticker.lagSmoothing())) { //note: if the tab is hidden, we should still wake if lagSmoothing has been disabled.
|
6437
6465
|
_ticker.wake();
|
6438
6466
|
}
|
6439
6467
|
var t = setTimeout(_checkTimeout, 2000);
|
@@ -6699,14 +6727,21 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6699
6727
|
if (!arguments.length) {
|
6700
6728
|
return this._timeScale;
|
6701
6729
|
}
|
6730
|
+
var pauseTime, t;
|
6702
6731
|
value = value || _tinyNum; //can't allow zero because it'll throw the math off
|
6703
6732
|
if (this._timeline && this._timeline.smoothChildTiming) {
|
6704
|
-
|
6705
|
-
|
6733
|
+
pauseTime = this._pauseTime;
|
6734
|
+
t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime();
|
6706
6735
|
this._startTime = t - ((t - this._startTime) * this._timeScale / value);
|
6707
6736
|
}
|
6708
6737
|
this._timeScale = value;
|
6709
|
-
|
6738
|
+
t = this.timeline;
|
6739
|
+
while (t && t.timeline) { //must update the duration/totalDuration of all ancestor timelines immediately in case in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though.
|
6740
|
+
t._dirty = true;
|
6741
|
+
t.totalDuration();
|
6742
|
+
t = t.timeline;
|
6743
|
+
}
|
6744
|
+
return this;
|
6710
6745
|
};
|
6711
6746
|
|
6712
6747
|
p.reversed = function(value) {
|
@@ -6943,7 +6978,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6943
6978
|
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
6944
6979
|
p._notifyPluginsOfEnabled = p._lazy = false;
|
6945
6980
|
|
6946
|
-
TweenLite.version = "1.20.
|
6981
|
+
TweenLite.version = "1.20.3";
|
6947
6982
|
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
6948
6983
|
TweenLite.defaultOverwrite = "auto";
|
6949
6984
|
TweenLite.ticker = _ticker;
|
@@ -6971,7 +7006,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6971
7006
|
min = 0.000001,
|
6972
7007
|
val;
|
6973
7008
|
while (pt) {
|
6974
|
-
val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end) ? this.end : v ? this.join("") : this.start;
|
7009
|
+
val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end != null) ? this.end : v ? this.join("") : this.start;
|
6975
7010
|
if (pt.m) {
|
6976
7011
|
val = pt.m(val, this._target || pt.t);
|
6977
7012
|
} else if (val < min) if (val > -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browser
|
@@ -7042,7 +7077,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
7042
7077
|
}
|
7043
7078
|
a.setRatio = _setRatio;
|
7044
7079
|
if (_relExp.test(end)) { //if the end string contains relative values, delete it so that on the final render (in _setRatio()), we don't actually set it to the string with += or -= characters (forces it to use the calculated value).
|
7045
|
-
a.end =
|
7080
|
+
a.end = null;
|
7046
7081
|
}
|
7047
7082
|
return a;
|
7048
7083
|
},
|
@@ -7264,11 +7299,13 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
7264
7299
|
for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from);
|
7265
7300
|
startVars[p] = v.startAt[p];
|
7266
7301
|
}
|
7302
|
+
startVars.data = "isStart";
|
7267
7303
|
startVars.overwrite = false;
|
7268
7304
|
startVars.immediateRender = true;
|
7269
7305
|
startVars.lazy = (immediate && v.lazy !== false);
|
7270
7306
|
startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop).
|
7271
7307
|
startVars.onUpdate = v.onUpdate;
|
7308
|
+
startVars.onUpdateParams = v.onUpdateParams;
|
7272
7309
|
startVars.onUpdateScope = v.onUpdateScope || v.callbackScope || this;
|
7273
7310
|
this._startAt = TweenLite.to(this.target, 0, startVars);
|
7274
7311
|
if (immediate) {
|
@@ -7521,7 +7558,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
7521
7558
|
if (prevTime === 0) {
|
7522
7559
|
if (this._startAt) {
|
7523
7560
|
if (time >= 0) {
|
7524
|
-
this._startAt.render(time,
|
7561
|
+
this._startAt.render(time, true, force);
|
7525
7562
|
} else if (!callback) {
|
7526
7563
|
callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.
|
7527
7564
|
}
|
@@ -7542,7 +7579,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
7542
7579
|
|
7543
7580
|
if (this._onUpdate) {
|
7544
7581
|
if (time < 0) if (this._startAt && time !== -0.0001) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
|
7545
|
-
this._startAt.render(time,
|
7582
|
+
this._startAt.render(time, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.
|
7546
7583
|
}
|
7547
7584
|
if (!suppressEvents) if (this._time !== prevTime || isComplete || force) {
|
7548
7585
|
this._callback("onUpdate");
|
@@ -7550,7 +7587,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
7550
7587
|
}
|
7551
7588
|
if (callback) if (!this._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate
|
7552
7589
|
if (time < 0 && this._startAt && !this._onUpdate && time !== -0.0001) { //-0.0001 is a special value that we use when looping back to the beginning of a repeated TimelineMax, in which case we shouldn't render the _startAt values.
|
7553
|
-
this._startAt.render(time,
|
7590
|
+
this._startAt.render(time, true, force);
|
7554
7591
|
}
|
7555
7592
|
if (isComplete) {
|
7556
7593
|
if (this._timeline.autoRemoveChildren) {
|
@@ -100,7 +100,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
100
100
|
if (p < this._p1) {
|
101
101
|
return this._calcEnd ? 1 - ((p = 1 - (p / this._p1)) * p) : r - ((p = 1 - (p / this._p1)) * p * p * p * r);
|
102
102
|
} else if (p > this._p3) {
|
103
|
-
return this._calcEnd ? 1 - (p = (p - this._p3) / this._p1) * p : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p);
|
103
|
+
return this._calcEnd ? (p === 1 ? 0 : 1 - (p = (p - this._p3) / this._p1) * p) : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p); //added p === 1 ? 0 to avoid floating point rounding errors from affecting the final value, like 1 - 0.7 = 0.30000000000000004 instead of 0.3
|
104
104
|
}
|
105
105
|
return this._calcEnd ? 1 : r;
|
106
106
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.20.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 1.20.3
|
3
|
+
* DATE: 2017-10-02
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -31,7 +31,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
31
31
|
p = CSSPlugin.prototype = new TweenPlugin("css");
|
32
32
|
|
33
33
|
p.constructor = CSSPlugin;
|
34
|
-
CSSPlugin.version = "1.20.
|
34
|
+
CSSPlugin.version = "1.20.3";
|
35
35
|
CSSPlugin.API = 2;
|
36
36
|
CSSPlugin.defaultTransformPerspective = 0;
|
37
37
|
CSSPlugin.defaultSkewType = "compensated";
|
@@ -498,7 +498,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
498
498
|
g = (l <= 0.5) ? l * (s + 1) : l + s - l * s;
|
499
499
|
r = l * 2 - g;
|
500
500
|
if (a.length > 3) {
|
501
|
-
a[3] = Number(
|
501
|
+
a[3] = Number(a[3]);
|
502
502
|
}
|
503
503
|
a[0] = _hue(h + 1 / 3, r, g);
|
504
504
|
a[1] = _hue(h, r, g);
|
@@ -880,8 +880,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
880
880
|
autoRound = (_autoRound !== false),
|
881
881
|
i, xi, ni, bv, ev, bnums, enums, bn, hasAlpha, temp, cv, str, useHSL;
|
882
882
|
if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) {
|
883
|
-
|
884
|
-
|
883
|
+
if ((e + b).indexOf("rgb") !== -1 || (e + b).indexOf("hsl") !== -1) { //keep rgb(), rgba(), hsl(), and hsla() values together! (remember, we're splitting on spaces)
|
884
|
+
ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");
|
885
|
+
ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");
|
886
|
+
} else {
|
887
|
+
ba = ba.join(" ").split(",").join(", ").split(" ");
|
888
|
+
ea = ea.join(" ").split(",").join(", ").split(" ");
|
889
|
+
}
|
885
890
|
l = ba.length;
|
886
891
|
}
|
887
892
|
if (l !== ea.length) {
|
@@ -1289,7 +1294,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1289
1294
|
}
|
1290
1295
|
},
|
1291
1296
|
_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).
|
1292
|
-
var svg = _createElement("svg", this.ownerSVGElement.getAttribute("xmlns") || "http://www.w3.org/2000/svg"),
|
1297
|
+
var svg = _createElement("svg", (this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns")) || "http://www.w3.org/2000/svg"),
|
1293
1298
|
oldParent = this.parentNode,
|
1294
1299
|
oldSibling = this.nextSibling,
|
1295
1300
|
oldCSS = this.style.cssText,
|
@@ -1323,7 +1328,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1323
1328
|
}
|
1324
1329
|
},
|
1325
1330
|
_isSVG = function(e) { //reports if the element is an SVG on which getBBox() actually works
|
1326
|
-
return !!(_SVGElement && e.getCTM &&
|
1331
|
+
return !!(_SVGElement && e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e));
|
1327
1332
|
},
|
1328
1333
|
_identity2DMatrix = [1,0,0,1,0,0],
|
1329
1334
|
_getMatrix = function(e, force2D) {
|
@@ -1339,7 +1344,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1339
1344
|
s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";
|
1340
1345
|
}
|
1341
1346
|
isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
|
1342
|
-
if (_transformProp && ((none = (_getComputedStyle(e).display === "none")) || !e.parentNode)) {
|
1347
|
+
if (_transformProp && ((none = (!_getComputedStyle(e) || _getComputedStyle(e).display === "none")) || !e.parentNode)) { //note: Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
|
1343
1348
|
if (none) { //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
|
1344
1349
|
n = style.display;
|
1345
1350
|
style.display = "block";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: beta 1.5.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: beta 1.5.3
|
3
|
+
* DATE: 2017-09-14
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -76,7 +76,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
76
76
|
g = (l <= 0.5) ? l * (s + 1) : l + s - l * s;
|
77
77
|
r = l * 2 - g;
|
78
78
|
if (a.length > 3) {
|
79
|
-
a[3] = Number(
|
79
|
+
a[3] = Number(a[3]);
|
80
80
|
}
|
81
81
|
a[0] = _hue(h + 1 / 3, r, g);
|
82
82
|
a[1] = _hue(h, r, g);
|
@@ -140,7 +140,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
140
140
|
|
141
141
|
ColorPropsPlugin = _gsScope._gsDefine.plugin({
|
142
142
|
propName: "colorProps",
|
143
|
-
version: "1.5.
|
143
|
+
version: "1.5.3",
|
144
144
|
priority: -1,
|
145
145
|
API: 2,
|
146
146
|
global: true,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 0.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 0.2.0
|
3
|
+
* DATE: 2017-07-13
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -385,13 +385,13 @@ var _gsScope = (typeof module !== "undefined" && module.exports && typeof global
|
|
385
385
|
priority: 0,
|
386
386
|
API: 2,
|
387
387
|
global: true,
|
388
|
-
version: "0.
|
388
|
+
version: "0.2.0",
|
389
389
|
|
390
390
|
init: function (target, values, tween, index) {
|
391
391
|
if (!target instanceof _gsScope.PIXI.DisplayObject) {
|
392
392
|
return false;
|
393
393
|
}
|
394
|
-
var context, axis, value, colorMatrix, filter, p, padding, colorSetter, i, data;
|
394
|
+
var context, axis, value, colorMatrix, filter, p, padding, colorSetter, i, data, pt;
|
395
395
|
for (p in values) {
|
396
396
|
context = _contexts[p];
|
397
397
|
value = values[p];
|
@@ -436,6 +436,13 @@ var _gsScope = (typeof module !== "undefined" && module.exports && typeof global
|
|
436
436
|
} else {
|
437
437
|
_addColorTween(target, p, value, colorSetter, this);
|
438
438
|
}
|
439
|
+
} else if (p === "autoAlpha") {
|
440
|
+
this._firstPT = pt = {t: {setRatio:function() { target.visible = !!target.alpha; }}, p: "setRatio", s: 0, c: 1, f: 1, pg: 0, n: "visible", pr: 0, m: 0, _next:this._firstPT};
|
441
|
+
if (pt._next) {
|
442
|
+
pt._next._prev = pt;
|
443
|
+
}
|
444
|
+
this._addTween(target, "alpha", target.alpha, value, "alpha");
|
445
|
+
this._overwriteProps.push("alpha", "visible");
|
439
446
|
} else {
|
440
447
|
this._addTween(target, p, target[p], value, p);
|
441
448
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 0.6.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 0.6.2
|
3
|
+
* DATE: 2017-08-02
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -30,6 +30,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
30
30
|
}
|
31
31
|
return result;
|
32
32
|
},
|
33
|
+
_emoji = "[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2694-\u2697]|\uD83E[\uDD10-\uDD5D]|[\uD800-\uDBFF][\uDC00-\uDFFF]",
|
34
|
+
_emojiExp = new RegExp(_emoji),
|
35
|
+
_emojiAndCharsExp = new RegExp(_emoji + "|.", "g"),
|
36
|
+
_emojiSafeSplit = function(text, delimiter) {
|
37
|
+
return ((delimiter === "" || !delimiter) && _emojiExp.test(text)) ? text.match(_emojiAndCharsExp) : text.split(delimiter || "");
|
38
|
+
},
|
39
|
+
/* //previous emoji-related splitting. New method above is faster and more concise.
|
33
40
|
_emojiStart = 0xD800,
|
34
41
|
_emojiEnd = 0xDBFF,
|
35
42
|
_emojiLowStart = 0xDC00,
|
@@ -61,10 +68,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
61
68
|
}
|
62
69
|
return a;
|
63
70
|
},
|
71
|
+
*/
|
64
72
|
TextPlugin = _gsScope._gsDefine.plugin({
|
65
73
|
propName: "text",
|
66
74
|
API: 2,
|
67
|
-
version:"0.6.
|
75
|
+
version:"0.6.2",
|
68
76
|
|
69
77
|
//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
|
70
78
|
init: function(target, value, tween, index) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 0.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 0.16.0
|
3
|
+
* DATE: 2017-10-02
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* Requires TweenLite and CSSPlugin version 1.17.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).
|
@@ -18,9 +18,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
18
18
|
|
19
19
|
_gsScope._gsDefine("utils.Draggable", ["events.EventDispatcher","TweenLite","plugins.CSSPlugin"], function(EventDispatcher, TweenLite, CSSPlugin) {
|
20
20
|
|
21
|
-
var _tempVarsXY = {css:{}}, //speed optimization - we reuse the same vars object for x/y TweenLite.set() calls to minimize garbage collection tasks and improve performance.
|
22
|
-
_tempVarsX = {css:{}},
|
23
|
-
_tempVarsY = {css:{}},
|
21
|
+
var _tempVarsXY = {css:{}, data:"_draggable"}, //speed optimization - we reuse the same vars object for x/y TweenLite.set() calls to minimize garbage collection tasks and improve performance.
|
22
|
+
_tempVarsX = {css:{}, data:"_draggable"},
|
23
|
+
_tempVarsY = {css:{}, data:"_draggable"},
|
24
24
|
_tempVarsRotation = {css:{}},
|
25
25
|
_globals = _gsScope._gsDefine.globals,
|
26
26
|
_tempEvent = {}, //for populating with pageX/pageY in old versions of IE
|
@@ -96,7 +96,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
96
96
|
_renderQueue.splice(i, 1);
|
97
97
|
}
|
98
98
|
}
|
99
|
-
TweenLite.to(_renderQueueTimeout, 0, {overwrite:"all", delay:15, onComplete:_renderQueueTimeout}); //remove the "tick" listener only after the render queue is empty for 15 seconds (to improve performance). Adding/removing it constantly for every click/touch wouldn't deliver optimal speed, and we also don't want the ticker to keep calling the render method when things are idle for long periods of time (we want to improve battery life on mobile devices).
|
99
|
+
TweenLite.to(_renderQueueTimeout, 0, {overwrite:"all", delay:15, onComplete:_renderQueueTimeout, data:"_draggable"}); //remove the "tick" listener only after the render queue is empty for 15 seconds (to improve performance). Adding/removing it constantly for every click/touch wouldn't deliver optimal speed, and we also don't want the ticker to keep calling the render method when things are idle for long periods of time (we want to improve battery life on mobile devices).
|
100
100
|
},
|
101
101
|
_renderQueueTimeout = function() {
|
102
102
|
if (!_renderQueue.length) {
|
@@ -590,7 +590,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
590
590
|
offsetOrigin.y -= offsetY;
|
591
591
|
sx = offsets.scaleX;
|
592
592
|
sy = offsets.scaleY;
|
593
|
-
if (!isBase) { //when getting the matrix for a root <svg> element itself (NOT in the context of an
|
593
|
+
if (!isBase) { //when getting the matrix for a root <svg> element itself (NOT in the context of an SVG element that's nested inside of it like a <path>), we do NOT apply the scaling!
|
594
594
|
offsetOrigin.x *= sx;
|
595
595
|
offsetOrigin.y *= sy;
|
596
596
|
}
|
@@ -635,7 +635,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
635
635
|
//note: we keep reusing _point1 and _point2 in order to minimize memory usage and garbage collection chores.
|
636
636
|
var originOffset = _getOffsetTransformOrigin(e, _point1),
|
637
637
|
parentOriginOffset = _getOffsetTransformOrigin(e.parentNode, _point2),
|
638
|
-
m = _getOffset2DMatrix(e, originOffset, parentOriginOffset, false,
|
638
|
+
m = _getOffset2DMatrix(e, originOffset, parentOriginOffset, false, !invert),
|
639
639
|
a, b, c, d, tx, ty, m2, determinant;
|
640
640
|
while ((e = e.parentNode) && e.parentNode && e !== _docElement) {
|
641
641
|
originOffset = parentOriginOffset;
|
@@ -858,12 +858,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
858
858
|
vars.end = function(value) {
|
859
859
|
var result = snap.call(draggable, value),
|
860
860
|
copy, p;
|
861
|
-
if (factor !== 1
|
862
|
-
|
863
|
-
|
864
|
-
|
861
|
+
if (factor !== 1) {
|
862
|
+
if (typeof(result) === "object") {
|
863
|
+
copy = {};
|
864
|
+
for (p in result) {
|
865
|
+
copy[p] = result[p] * factor;
|
866
|
+
}
|
867
|
+
result = copy;
|
868
|
+
} else {
|
869
|
+
result *= factor;
|
865
870
|
}
|
866
|
-
result = copy;
|
867
871
|
}
|
868
872
|
return result; //we need to ensure that we can scope the function call to the Draggable instance itself so that users can access important values like maxX, minX, maxY, minY, x, and y from within that function.
|
869
873
|
};
|
@@ -1168,6 +1172,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1168
1172
|
killProps = {},
|
1169
1173
|
dragEndTime = 0,
|
1170
1174
|
checkAutoScrollBounds = false,
|
1175
|
+
autoScrollMarginTop = vars.autoScrollMarginTop || 40,
|
1176
|
+
autoScrollMarginRight = vars.autoScrollMarginRight || 40,
|
1177
|
+
autoScrollMarginBottom = vars.autoScrollMarginBottom || 40,
|
1178
|
+
autoScrollMarginLeft = vars.autoScrollMarginLeft || 40,
|
1171
1179
|
isClickable = vars.clickableTest || _isClickable,
|
1172
1180
|
clickTime = 0,
|
1173
1181
|
enabled, scrollProxy, startPointerX, startPointerY, startElementX, startElementY, hasBounds, hasDragCallback, maxX, minX, maxY, minY, tempVars, cssVars, touch, touchID, rotationOrigin, dirty, old, snapX, snapY, snapXY, isClicking, touchEventTarget, matrix, interrupted, startScrollTop, startScrollLeft, applyObj, allowNativeTouchScrolling, touchDragAxis, isDispatching, clickDispatch, trustedClickDispatch,
|
@@ -1202,12 +1210,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1202
1210
|
gap = parent._gsMaxScrollY - parent.scrollTop;
|
1203
1211
|
if (gap < 0) {
|
1204
1212
|
changeY = gap;
|
1205
|
-
} else if (pointerY > rect.bottom -
|
1213
|
+
} else if (pointerY > rect.bottom - autoScrollMarginBottom && gap) {
|
1206
1214
|
checkAutoScrollBounds = true;
|
1207
|
-
changeY = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.bottom - pointerY)) /
|
1208
|
-
} else if (pointerY < rect.top +
|
1215
|
+
changeY = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.bottom - pointerY)) / autoScrollMarginBottom)) | 0);
|
1216
|
+
} else if (pointerY < rect.top + autoScrollMarginTop && parent.scrollTop) {
|
1209
1217
|
checkAutoScrollBounds = true;
|
1210
|
-
changeY = -Math.min(parent.scrollTop, (autoScrollFactor * (1 - Math.max(0, (pointerY - rect.top)) /
|
1218
|
+
changeY = -Math.min(parent.scrollTop, (autoScrollFactor * (1 - Math.max(0, (pointerY - rect.top)) / autoScrollMarginTop)) | 0);
|
1211
1219
|
}
|
1212
1220
|
if (changeY) {
|
1213
1221
|
parent.scrollTop += changeY;
|
@@ -1217,12 +1225,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1217
1225
|
gap = parent._gsMaxScrollX - parent.scrollLeft;
|
1218
1226
|
if (gap < 0) {
|
1219
1227
|
changeX = gap;
|
1220
|
-
} else if (pointerX > rect.right -
|
1228
|
+
} else if (pointerX > rect.right - autoScrollMarginRight && gap) {
|
1221
1229
|
checkAutoScrollBounds = true;
|
1222
|
-
changeX = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.right - pointerX)) /
|
1223
|
-
} else if (pointerX < rect.left +
|
1230
|
+
changeX = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.right - pointerX)) / autoScrollMarginRight)) | 0);
|
1231
|
+
} else if (pointerX < rect.left + autoScrollMarginLeft && parent.scrollLeft) {
|
1224
1232
|
checkAutoScrollBounds = true;
|
1225
|
-
changeX = -Math.min(parent.scrollLeft, (autoScrollFactor * (1 - Math.max(0, (pointerX - rect.left)) /
|
1233
|
+
changeX = -Math.min(parent.scrollLeft, (autoScrollFactor * (1 - Math.max(0, (pointerX - rect.left)) / autoScrollMarginLeft)) | 0);
|
1226
1234
|
}
|
1227
1235
|
if (changeX) {
|
1228
1236
|
parent.scrollLeft += changeX;
|
@@ -1296,7 +1304,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1296
1304
|
y = self.y,
|
1297
1305
|
snappedValue;
|
1298
1306
|
if (!target._gsTransform && (xyMode || rotationMode)) { //just in case the _gsTransform got wiped, like if the user called clearProps on the transform or something (very rare), doing an x tween forces a re-parsing of the transforms and population of the _gsTransform.
|
1299
|
-
TweenLite.set(target, {x:"+=0", overwrite:false});
|
1307
|
+
TweenLite.set(target, {x:"+=0", overwrite:false, data:"_draggable"});
|
1300
1308
|
}
|
1301
1309
|
if (xyMode) {
|
1302
1310
|
self.y = target._gsTransform.y;
|
@@ -1450,7 +1458,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1450
1458
|
}
|
1451
1459
|
self.isThrowing = true;
|
1452
1460
|
overshootTolerance = (!isNaN(vars.overshootTolerance)) ? vars.overshootTolerance : (vars.edgeResistance === 1) ? 0 : (1 - self.edgeResistance) + 0.2;
|
1453
|
-
self.tween = tween = ThrowPropsPlugin.to(scrollProxy || target, {throwProps:throwProps, ease:(vars.ease || _globals.Power3.easeOut), onComplete:onThrowComplete, onOverwrite:onThrowOverwrite, onUpdate:(vars.fastMode ? _dispatchEvent : syncXY), onUpdateParams:(vars.fastMode ? [self, "onthrowupdate", "onThrowUpdate"] : (snap && snap.radius) ? [false, true] : _emptyArray)}, (isNaN(vars.maxDuration) ? 2 : vars.maxDuration), (!isNaN(vars.minDuration) ? vars.minDuration : (overshootTolerance === 0 || (typeof(throwProps) === "object" && throwProps.resistance > 1000)) ? 0 : 0.5), overshootTolerance);
|
1461
|
+
self.tween = tween = ThrowPropsPlugin.to(scrollProxy || target, {throwProps:throwProps, data:"_draggable", ease:(vars.ease || _globals.Power3.easeOut), onComplete:onThrowComplete, onOverwrite:onThrowOverwrite, onUpdate:(vars.fastMode ? _dispatchEvent : syncXY), onUpdateParams:(vars.fastMode ? [self, "onthrowupdate", "onThrowUpdate"] : (snap && snap.radius) ? [false, true] : _emptyArray)}, (isNaN(vars.maxDuration) ? 2 : vars.maxDuration), (!isNaN(vars.minDuration) ? vars.minDuration : (overshootTolerance === 0 || (typeof(throwProps) === "object" && throwProps.resistance > 1000)) ? 0 : 0.5), overshootTolerance);
|
1454
1462
|
if (!vars.fastMode) {
|
1455
1463
|
//to populate the end values, we just scrub the tween to the end, record the values, and then jump back to the beginning.
|
1456
1464
|
if (scrollProxy) {
|
@@ -1643,9 +1651,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1643
1651
|
},
|
1644
1652
|
|
1645
1653
|
//called when the mouse is pressed (or touch starts)
|
1646
|
-
onPress = function(e) {
|
1654
|
+
onPress = function(e, force) {
|
1647
1655
|
var i;
|
1648
|
-
if (!enabled || self.isPressed || !e || ((e.type === "mousedown" || e.type === "pointerdown") && _getTime() - clickTime < 30 && _touchEventLookup[self.pointerEvent.type])) { //when we DON'T preventDefault() in order to accommodate touch-scrolling and the user just taps, many browsers also fire a mousedown/mouseup sequence AFTER the touchstart/touchend sequence, thus it'd result in two quick "click" events being dispatched. This line senses that condition and halts it on the subsequent mousedown.
|
1656
|
+
if (!enabled || self.isPressed || !e || ((e.type === "mousedown" || e.type === "pointerdown") && !force && _getTime() - clickTime < 30 && _touchEventLookup[self.pointerEvent.type])) { //when we DON'T preventDefault() in order to accommodate touch-scrolling and the user just taps, many browsers also fire a mousedown/mouseup sequence AFTER the touchstart/touchend sequence, thus it'd result in two quick "click" events being dispatched. This line senses that condition and halts it on the subsequent mousedown.
|
1649
1657
|
return;
|
1650
1658
|
}
|
1651
1659
|
interrupted = isTweening();
|
@@ -1665,7 +1673,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1665
1673
|
if (e && e.target) {
|
1666
1674
|
_addListener(e.target, "mouseup", onRelease); //we also have to listen directly on the element because some browsers don't bubble up the event to the _doc on elements with contentEditable="true"
|
1667
1675
|
}
|
1668
|
-
isClicking = (isClickable.call(self, e.target) && !vars.dragClickables);
|
1676
|
+
isClicking = (isClickable.call(self, e.target) && !vars.dragClickables && !force);
|
1669
1677
|
if (isClicking) {
|
1670
1678
|
_addListener(e.target, "change", onRelease); //in some browsers, when you mousedown on a <select> element, no mouseup gets dispatched! So we listen for a "change" event instead.
|
1671
1679
|
_dispatchEvent(self, "press", "onPress");
|
@@ -1696,8 +1704,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1696
1704
|
if (allowNativeTouchScrolling || self.autoScroll) {
|
1697
1705
|
_recordMaxScrolls(target.parentNode);
|
1698
1706
|
}
|
1699
|
-
if (target.parentNode &&
|
1700
|
-
_placeholderDiv.style.width =
|
1707
|
+
if (target.parentNode && self.autoScroll && !scrollProxy && !rotationMode && target.parentNode._gsMaxScrollX && !_placeholderDiv.parentNode && !target.getBBox) { //add a placeholder div to prevent the parent container from collapsing when the user drags the element left.
|
1708
|
+
_placeholderDiv.style.width = target.parentNode.scrollWidth + "px";
|
1701
1709
|
target.parentNode.appendChild(_placeholderDiv);
|
1702
1710
|
}
|
1703
1711
|
recordStartPositions();
|
@@ -1795,13 +1803,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1795
1803
|
if (rotationMode) {
|
1796
1804
|
y = Math.atan2(rotationOrigin.y - pointerY, pointerX - rotationOrigin.x) * _RAD2DEG;
|
1797
1805
|
dif = self.y - y;
|
1798
|
-
self.y = y;
|
1799
1806
|
if (dif > 180) {
|
1800
1807
|
startElementY -= 360;
|
1801
1808
|
} else if (dif < -180) {
|
1802
1809
|
startElementY += 360;
|
1803
1810
|
}
|
1804
|
-
x
|
1811
|
+
if (self.x !== startElementX || Math.abs(startElementY - y) > minimumMovement) {
|
1812
|
+
self.y = y;
|
1813
|
+
x = startElementX + (startElementY - y) * dragTolerance;
|
1814
|
+
} else {
|
1815
|
+
x = startElementX;
|
1816
|
+
}
|
1805
1817
|
|
1806
1818
|
} else {
|
1807
1819
|
if (matrix) {
|
@@ -1914,6 +1926,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1914
1926
|
if (isClicking) {
|
1915
1927
|
if (e) {
|
1916
1928
|
_removeListener(e.target, "change", onRelease);
|
1929
|
+
self.pointerEvent = originalEvent;
|
1917
1930
|
}
|
1918
1931
|
_setSelectable(triggers, false);
|
1919
1932
|
_dispatchEvent(self, "release", "onRelease");
|
@@ -1957,8 +1970,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1957
1970
|
animate(vars.throwProps);
|
1958
1971
|
}
|
1959
1972
|
_dispatchEvent(self, "release", "onRelease");
|
1960
|
-
if (!_isAndroid || originalEvent.type !== "touchmove") { //to accommodate native scrolling on Android devices, we have to immediately call onRelease() on the first touchmove event, but that shouldn't trigger a "click".
|
1973
|
+
if ((!_isAndroid || originalEvent.type !== "touchmove") && originalEvent.type.indexOf("cancel") === -1) { //to accommodate native scrolling on Android devices, we have to immediately call onRelease() on the first touchmove event, but that shouldn't trigger a "click".
|
1961
1974
|
_dispatchEvent(self, "click", "onClick");
|
1975
|
+
if (_getTime() - clickTime < 300) {
|
1976
|
+
_dispatchEvent(self, "doubleclick", "onDoubleClick");
|
1977
|
+
}
|
1962
1978
|
eventTarget = originalEvent.target || originalEvent.srcElement || target; //old IE uses srcElement
|
1963
1979
|
clickTime = _getTime();
|
1964
1980
|
syntheticClick = function() { // some browsers (like Firefox) won't trust script-generated clicks, so if the user tries to click on a video to play it, for example, it simply won't work. Since a regular "click" event will most likely be generated anyway (one that has its isTrusted flag set to true), we must slightly delay our script-generated click so that the "real"/trusted one is prioritized. Remember, when there are duplicate events in quick succession, we suppress all but the first one. Some browsers don't even trigger the "real" one at all, so our synthetic one is a safety valve that ensures that no matter what, a click event does get dispatched.
|
@@ -2044,6 +2060,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2044
2060
|
}
|
2045
2061
|
}
|
2046
2062
|
}
|
2063
|
+
},
|
2064
|
+
|
2065
|
+
localizePoint = function(p) {
|
2066
|
+
return matrix ? {x:p.x * matrix[0] + p.y * matrix[2] + matrix[4], y:p.x * matrix[1] + p.y * matrix[3] + matrix[5]} : {x:p.x, y:p.y};
|
2047
2067
|
};
|
2048
2068
|
|
2049
2069
|
old = Draggable.get(this.target);
|
@@ -2052,8 +2072,18 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2052
2072
|
}
|
2053
2073
|
|
2054
2074
|
//give the user access to start/stop dragging...
|
2055
|
-
this.startDrag = function(e) {
|
2056
|
-
|
2075
|
+
this.startDrag = function(e, align) {
|
2076
|
+
var r1, r2, p1, p2;
|
2077
|
+
onPress(e || self.pointerEvent, true);
|
2078
|
+
//if the pointer isn't on top of the element, adjust things accordingly
|
2079
|
+
if (align && !self.hitTest(e || self.pointerEvent)) {
|
2080
|
+
r1 = _parseRect(e || self.pointerEvent);
|
2081
|
+
r2 = _parseRect(target);
|
2082
|
+
p1 = localizePoint({x:r1.left + r1.width / 2, y:r1.top + r1.height / 2});
|
2083
|
+
p2 = localizePoint({x:r2.left + r2.width / 2, y:r2.top + r2.height / 2});
|
2084
|
+
startPointerX -= p1.x - p2.x;
|
2085
|
+
startPointerY -= p1.y - p2.y;
|
2086
|
+
}
|
2057
2087
|
if (!self.isDragging) {
|
2058
2088
|
self.isDragging = true;
|
2059
2089
|
_dispatchEvent(self, "dragstart", "onDragStart");
|
@@ -2061,11 +2091,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2061
2091
|
};
|
2062
2092
|
this.drag = onMove;
|
2063
2093
|
this.endDrag = function(e) {
|
2064
|
-
onRelease(e, true);
|
2094
|
+
onRelease(e || self.pointerEvent, true);
|
2065
2095
|
};
|
2066
2096
|
this.timeSinceDrag = function() {
|
2067
2097
|
return self.isDragging ? 0 : (_getTime() - dragEndTime) / 1000;
|
2068
2098
|
};
|
2099
|
+
this.timeSinceClick = function() {
|
2100
|
+
return (_getTime() - clickTime) / 1000;
|
2101
|
+
};
|
2069
2102
|
this.hitTest = function(target, threshold) {
|
2070
2103
|
return Draggable.hitTest(self.target, target, threshold);
|
2071
2104
|
};
|
@@ -2221,7 +2254,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2221
2254
|
if (scrollProxy) {
|
2222
2255
|
scrollProxy.element._gsDragID = id;
|
2223
2256
|
}
|
2224
|
-
TweenLite.set(target, {x:"+=0", overwrite:false}); //simply ensures that there's a _gsTransform on the element.
|
2257
|
+
TweenLite.set(target, {x:"+=0", overwrite:false, data:"_draggable"}); //simply ensures that there's a _gsTransform on the element.
|
2225
2258
|
applyObj = {
|
2226
2259
|
t:target,
|
2227
2260
|
data:_isOldIE ? cssVars : target._gsTransform,
|
@@ -2331,7 +2364,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2331
2364
|
p.constructor = Draggable;
|
2332
2365
|
p.pointerX = p.pointerY = p.startX = p.startY = p.deltaX = p.deltaY = 0;
|
2333
2366
|
p.isDragging = p.isPressed = false;
|
2334
|
-
Draggable.version = "0.
|
2367
|
+
Draggable.version = "0.16.0";
|
2335
2368
|
Draggable.zIndex = 1000;
|
2336
2369
|
|
2337
2370
|
_addListener(_doc, "touchcancel", function() {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: greensock-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.20.
|
4
|
+
version: 1.20.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Pataki, Greensock Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|