greensock-rails 1.18.0.1 → 1.18.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf2c7f3d1650b979c877e48e3993d7dd28954e9f
4
- data.tar.gz: 86515cf438e6d4b1ce465313aca6cbb1b07c8d62
3
+ metadata.gz: 74cd3721b8caecc6be502d7a0e250dfc8582dd29
4
+ data.tar.gz: e87056ee4b5de803dd6445888c65b25d869d3634
5
5
  SHA512:
6
- metadata.gz: 1715a72ccf921ed2a790316b92e03fa5fb27bf90e59ac4f5815c27eb49646571e09bb2b9110e584b2fb480ae1ce58b25cc5862b9f1ec2b7cb94d127fbcdbcbcd
7
- data.tar.gz: e1ab4a6a3956f756ebd0dd9a14395879a9b4f79662e64cd9beb80da265f4db3add8112db86fb793d36c768b44d3636fff46b79755160ee6442d49fa75cf96995
6
+ metadata.gz: 1470d5b3081fcfaca56c30b2baf4610afcfca9b19db9014089591ade2eff643c3d61e8e0d1cfb881de45f22339a8f7e5db9a8399287d51d50e34645d6defafe6
7
+ data.tar.gz: 259a03bfc4e605507f3752e952098431703fc439abb75078d1f36ef5afd30686a7a3477f730f9a0590d27a550e31808b84a255fb1f886fb3e54587672f7d939d
@@ -1,5 +1,5 @@
1
1
  module Greensock
2
2
  module Rails
3
- VERSION = "1.18.0.1"
3
+ VERSION = "1.18.1.0"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.18.0
3
- * DATE: 2015-08-29
2
+ * VERSION: 1.18.1
3
+ * DATE: 2015-12-10
4
4
  * UPDATES AND DOCS AT: http://greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2015, 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.18.0";
72
+ TimelineLite.version = "1.18.1";
73
73
  p.constructor = TimelineLite;
74
74
  p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
75
75
 
@@ -369,14 +369,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
369
369
  prevStart = this._startTime,
370
370
  prevTimeScale = this._timeScale,
371
371
  prevPaused = this._paused,
372
- tween, isComplete, next, callback, internalForce, pauseTween;
373
- if (time >= totalDur) {
372
+ tween, isComplete, next, callback, internalForce, pauseTween, curTime;
373
+ if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
374
374
  this._totalTime = this._time = totalDur;
375
375
  if (!this._reversed) if (!this._hasPausedChild()) {
376
376
  isComplete = true;
377
377
  callback = "onComplete";
378
378
  internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
379
- if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
379
+ if (this._duration === 0) if ((time <= 0 && time >= -0.0000001) || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
380
380
  internalForce = true;
381
381
  if (this._rawPrevTime > _tinyNum) {
382
382
  callback = "onReverseComplete";
@@ -460,13 +460,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
460
460
  this._callback("onStart");
461
461
  }
462
462
 
463
- if (this._time >= prevTime) {
463
+ curTime = this._time;
464
+ if (curTime >= prevTime) {
464
465
  tween = this._first;
465
466
  while (tween) {
466
467
  next = tween._next; //record it here because the value could change after rendering...
467
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
468
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
468
469
  break;
469
- } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {
470
+ } else if (tween._active || (tween._startTime <= curTime && !tween._paused && !tween._gc)) {
470
471
  if (pauseTween === tween) {
471
472
  this.pause();
472
473
  }
@@ -482,7 +483,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
482
483
  tween = this._last;
483
484
  while (tween) {
484
485
  next = tween._prev; //record it here because the value could change after rendering...
485
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
486
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
486
487
  break;
487
488
  } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {
488
489
  if (pauseTween === tween) {
@@ -725,10 +726,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
725
726
  }
726
727
  return this._totalDuration;
727
728
  }
728
- if (this.totalDuration() !== 0) if (value !== 0) {
729
- this.timeScale(this._totalDuration / value);
730
- }
731
- return this;
729
+ return (value && this.totalDuration()) ? this.timeScale(this._totalDuration / value) : this;
732
730
  };
733
731
 
734
732
  p.paused = function(value) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.18.0
3
- * DATE: 2015-08-29
2
+ * VERSION: 1.18.1
3
+ * DATE: 2015-12-10
4
4
  * UPDATES AND DOCS AT: http://greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
@@ -33,7 +33,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
33
33
 
34
34
  p.constructor = TimelineMax;
35
35
  p.kill()._gc = false;
36
- TimelineMax.version = "1.18.0";
36
+ TimelineMax.version = "1.18.1";
37
37
 
38
38
  p.invalidate = function() {
39
39
  this._yoyo = (this.vars.yoyo === true);
@@ -113,8 +113,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
113
113
  prevRawPrevTime = this._rawPrevTime,
114
114
  prevPaused = this._paused,
115
115
  prevCycle = this._cycle,
116
- tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween;
117
- if (time >= totalDur) {
116
+ tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime;
117
+ if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
118
118
  if (!this._locked) {
119
119
  this._totalTime = totalDur;
120
120
  this._cycle = this._repeat;
@@ -123,7 +123,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
123
123
  isComplete = true;
124
124
  callback = "onComplete";
125
125
  internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
126
- if (this._duration === 0) if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {
126
+ if (this._duration === 0) if ((time <= 0 && time >= -0.0000001) || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {
127
127
  internalForce = true;
128
128
  if (prevRawPrevTime > _tinyNum) {
129
129
  callback = "onReverseComplete";
@@ -262,6 +262,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
262
262
  this._callback("onRepeat");
263
263
  }
264
264
  }
265
+ if (prevTime !== this._time) { //in case there's a callback like onComplete in a nested tween/timeline that changes the playhead position, like via seek(), we should just abort.
266
+ return;
267
+ }
265
268
  if (wrap) {
266
269
  prevTime = (backwards) ? dur + 0.0001 : -0.0001;
267
270
  this.render(prevTime, true, false);
@@ -293,11 +296,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
293
296
  this._callback("onStart");
294
297
  }
295
298
 
296
- if (this._time >= prevTime) {
299
+ curTime = this._time;
300
+ if (curTime >= prevTime) {
297
301
  tween = this._first;
298
302
  while (tween) {
299
303
  next = tween._next; //record it here because the value could change after rendering...
300
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
304
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
301
305
  break;
302
306
  } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {
303
307
  if (pauseTween === tween) {
@@ -315,7 +319,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
315
319
  tween = this._last;
316
320
  while (tween) {
317
321
  next = tween._prev; //record it here because the value could change after rendering...
318
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
322
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
319
323
  break;
320
324
  } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {
321
325
  if (pauseTween === tween) {
@@ -446,7 +450,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
446
450
  }
447
451
  return this._totalDuration;
448
452
  }
449
- return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) );
453
+ return (this._repeat === -1 || !value) ? this : this.timeScale( this.totalDuration() / value );
450
454
  };
451
455
 
452
456
  p.time = function(value, suppressEvents) {
@@ -569,7 +573,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
569
573
  },
570
574
  p = TimelineLite.prototype = new SimpleTimeline();
571
575
 
572
- TimelineLite.version = "1.18.0";
576
+ TimelineLite.version = "1.18.1";
573
577
  p.constructor = TimelineLite;
574
578
  p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
575
579
 
@@ -869,14 +873,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
869
873
  prevStart = this._startTime,
870
874
  prevTimeScale = this._timeScale,
871
875
  prevPaused = this._paused,
872
- tween, isComplete, next, callback, internalForce, pauseTween;
873
- if (time >= totalDur) {
876
+ tween, isComplete, next, callback, internalForce, pauseTween, curTime;
877
+ if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
874
878
  this._totalTime = this._time = totalDur;
875
879
  if (!this._reversed) if (!this._hasPausedChild()) {
876
880
  isComplete = true;
877
881
  callback = "onComplete";
878
882
  internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
879
- if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
883
+ if (this._duration === 0) if ((time <= 0 && time >= -0.0000001) || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
880
884
  internalForce = true;
881
885
  if (this._rawPrevTime > _tinyNum) {
882
886
  callback = "onReverseComplete";
@@ -960,13 +964,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
960
964
  this._callback("onStart");
961
965
  }
962
966
 
963
- if (this._time >= prevTime) {
967
+ curTime = this._time;
968
+ if (curTime >= prevTime) {
964
969
  tween = this._first;
965
970
  while (tween) {
966
971
  next = tween._next; //record it here because the value could change after rendering...
967
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
972
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
968
973
  break;
969
- } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {
974
+ } else if (tween._active || (tween._startTime <= curTime && !tween._paused && !tween._gc)) {
970
975
  if (pauseTween === tween) {
971
976
  this.pause();
972
977
  }
@@ -982,7 +987,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
982
987
  tween = this._last;
983
988
  while (tween) {
984
989
  next = tween._prev; //record it here because the value could change after rendering...
985
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
990
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
986
991
  break;
987
992
  } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {
988
993
  if (pauseTween === tween) {
@@ -1225,10 +1230,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1225
1230
  }
1226
1231
  return this._totalDuration;
1227
1232
  }
1228
- if (this.totalDuration() !== 0) if (value !== 0) {
1229
- this.timeScale(this._totalDuration / value);
1230
- }
1231
- return this;
1233
+ return (value && this.totalDuration()) ? this.timeScale(this._totalDuration / value) : this;
1232
1234
  };
1233
1235
 
1234
1236
  p.paused = function(value) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.18.0
3
- * DATE: 2015-09-03
2
+ * VERSION: 1.18.1
3
+ * DATE: 2015-12-11
4
4
  * UPDATES AND DOCS AT: http://greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
@@ -287,7 +287,7 @@
287
287
  _class("Ticker", function(fps, useRAF) {
288
288
  var _self = this,
289
289
  _startTime = _getTime(),
290
- _useRAF = (useRAF !== false && _reqAnimFrame),
290
+ _useRAF = (useRAF !== false && _reqAnimFrame) ? "auto" : false,
291
291
  _lagThreshold = 500,
292
292
  _adjustedLag = 33,
293
293
  _tickWord = "tick", //helps reduce gc burden
@@ -341,9 +341,11 @@
341
341
  }
342
342
  };
343
343
 
344
- _self.wake = function() {
344
+ _self.wake = function(seamless) {
345
345
  if (_id !== null) {
346
346
  _self.sleep();
347
+ } else if (seamless) {
348
+ _startTime += -_lastUpdate + (_lastUpdate = _getTime());
347
349
  } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout().
348
350
  _lastUpdate = _getTime() - _lagThreshold + 5;
349
351
  }
@@ -376,7 +378,7 @@
376
378
 
377
379
  //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.
378
380
  setTimeout(function() {
379
- if (_useRAF && _self.frame < 5) {
381
+ if (_useRAF === "auto" && _self.frame < 5 && document.visibilityState !== "hidden") {
380
382
  _self.useRAF(false);
381
383
  }
382
384
  }, 1500);
@@ -923,7 +925,7 @@
923
925
  p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
924
926
  p._notifyPluginsOfEnabled = p._lazy = false;
925
927
 
926
- TweenLite.version = "1.18.0";
928
+ TweenLite.version = "1.18.1";
927
929
  TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
928
930
  TweenLite.defaultOverwrite = "auto";
929
931
  TweenLite.ticker = _ticker;
@@ -1037,7 +1039,8 @@
1037
1039
  blob = _blobDif(s, end, stringFilter || TweenLite.defaultStringFilter, pt);
1038
1040
  pt = {t:blob, p:"setRatio", s:0, c:1, f:2, pg:0, n:overwriteProp || prop, pr:0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example.
1039
1041
  } else if (!isRelative) {
1040
- pt.c = (parseFloat(end) - parseFloat(s)) || 0;
1042
+ pt.s = parseFloat(s);
1043
+ pt.c = (parseFloat(end) - pt.s) || 0;
1041
1044
  }
1042
1045
  }
1043
1046
  if (pt.c) { //only add it to the linked list if there's a change.
@@ -1382,7 +1385,7 @@
1382
1385
  duration = this._duration,
1383
1386
  prevRawPrevTime = this._rawPrevTime,
1384
1387
  isComplete, callback, pt, rawPrevTime;
1385
- if (time >= duration) {
1388
+ if (time >= duration - 0.0000001) { //to work around occasional floating point math artifacts.
1386
1389
  this._totalTime = this._time = duration;
1387
1390
  this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;
1388
1391
  if (!this._reversed ) {
@@ -1394,7 +1397,7 @@
1394
1397
  if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
1395
1398
  time = 0;
1396
1399
  }
1397
- if (time === 0 || prevRawPrevTime < 0 || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause.
1400
+ if (prevRawPrevTime < 0 || (time <= 0 && time >= -0.0000001) || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause.
1398
1401
  force = true;
1399
1402
  if (prevRawPrevTime > _tinyNum) {
1400
1403
  callback = "onReverseComplete";
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.18.0
3
- * DATE: 2015-09-05
2
+ * VERSION: 1.18.1
3
+ * DATE: 2015-12-11
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
@@ -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.18.0";
53
+ TweenMax.version = "1.18.1";
54
54
  p.constructor = TweenMax;
55
55
  p.kill()._gc = false;
56
56
  TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
@@ -97,20 +97,22 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
97
97
  TweenLite._onPluginEvent("_onDisable", this); //in case a plugin like MotionBlur must perform some cleanup tasks
98
98
  }
99
99
  if (this._time / this._duration > 0.998) { //if the tween has finished (or come extremely close to finishing), we just need to rewind it to 0 and then render it again at the end which forces it to re-initialize (parsing the new vars). We allow tweens that are close to finishing (but haven't quite finished) to work this way too because otherwise, the values are so small when determining where to project the starting values that binary math issues creep in and can make the tween appear to render incorrectly when run backwards.
100
- var prevTime = this._time;
100
+ var prevTime = this._totalTime;
101
101
  this.render(0, true, false);
102
102
  this._initted = false;
103
103
  this.render(prevTime, true, false);
104
- } else if (this._time > 0 || immediate) {
104
+ } else {
105
105
  this._initted = false;
106
106
  this._init();
107
- var inv = 1 / (1 - curRatio),
108
- pt = this._firstPT, endValue;
109
- while (pt) {
110
- endValue = pt.s + pt.c;
111
- pt.c *= inv;
112
- pt.s = endValue - pt.c;
113
- pt = pt._next;
107
+ if (this._time > 0 || immediate) {
108
+ var inv = 1 / (1 - curRatio),
109
+ pt = this._firstPT, endValue;
110
+ while (pt) {
111
+ endValue = pt.s + pt.c;
112
+ pt.c *= inv;
113
+ pt.s = endValue - pt.c;
114
+ pt = pt._next;
115
+ }
114
116
  }
115
117
  }
116
118
  }
@@ -129,7 +131,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
129
131
  duration = this._duration,
130
132
  prevRawPrevTime = this._rawPrevTime,
131
133
  isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime;
132
- if (time >= totalDur) {
134
+ if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
133
135
  this._totalTime = totalDur;
134
136
  this._cycle = this._repeat;
135
137
  if (this._yoyo && (this._cycle & 1) !== 0) {
@@ -148,7 +150,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
148
150
  if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
149
151
  time = 0;
150
152
  }
151
- if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time) {
153
+ if (prevRawPrevTime < 0 || (time <= 0 && time >= -0.0000001) || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause.
152
154
  force = true;
153
155
  if (prevRawPrevTime > _tinyNum) {
154
156
  callback = "onReverseComplete";
@@ -341,7 +343,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
341
343
 
342
344
  TweenMax.staggerTo = TweenMax.allTo = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {
343
345
  stagger = stagger || 0;
344
- var delay = vars.delay || 0,
346
+ var delay = 0,
345
347
  a = [],
346
348
  finalComplete = function() {
347
349
  if (vars.onComplete) {
@@ -382,7 +384,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
382
384
  }
383
385
  _applyCycle(copy.startAt, targets, i);
384
386
  }
385
- copy.delay = delay;
387
+ copy.delay = delay + (copy.delay || 0);
386
388
  if (i === l && onCompleteAll) {
387
389
  copy.onComplete = finalComplete;
388
390
  }
@@ -682,7 +684,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
682
684
  },
683
685
  p = TimelineLite.prototype = new SimpleTimeline();
684
686
 
685
- TimelineLite.version = "1.18.0";
687
+ TimelineLite.version = "1.18.1";
686
688
  p.constructor = TimelineLite;
687
689
  p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
688
690
 
@@ -982,14 +984,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
982
984
  prevStart = this._startTime,
983
985
  prevTimeScale = this._timeScale,
984
986
  prevPaused = this._paused,
985
- tween, isComplete, next, callback, internalForce, pauseTween;
986
- if (time >= totalDur) {
987
+ tween, isComplete, next, callback, internalForce, pauseTween, curTime;
988
+ if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
987
989
  this._totalTime = this._time = totalDur;
988
990
  if (!this._reversed) if (!this._hasPausedChild()) {
989
991
  isComplete = true;
990
992
  callback = "onComplete";
991
993
  internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
992
- if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
994
+ if (this._duration === 0) if ((time <= 0 && time >= -0.0000001) || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
993
995
  internalForce = true;
994
996
  if (this._rawPrevTime > _tinyNum) {
995
997
  callback = "onReverseComplete";
@@ -1073,13 +1075,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1073
1075
  this._callback("onStart");
1074
1076
  }
1075
1077
 
1076
- if (this._time >= prevTime) {
1078
+ curTime = this._time;
1079
+ if (curTime >= prevTime) {
1077
1080
  tween = this._first;
1078
1081
  while (tween) {
1079
1082
  next = tween._next; //record it here because the value could change after rendering...
1080
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
1083
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
1081
1084
  break;
1082
- } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {
1085
+ } else if (tween._active || (tween._startTime <= curTime && !tween._paused && !tween._gc)) {
1083
1086
  if (pauseTween === tween) {
1084
1087
  this.pause();
1085
1088
  }
@@ -1095,7 +1098,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1095
1098
  tween = this._last;
1096
1099
  while (tween) {
1097
1100
  next = tween._prev; //record it here because the value could change after rendering...
1098
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
1101
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
1099
1102
  break;
1100
1103
  } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {
1101
1104
  if (pauseTween === tween) {
@@ -1338,10 +1341,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1338
1341
  }
1339
1342
  return this._totalDuration;
1340
1343
  }
1341
- if (this.totalDuration() !== 0) if (value !== 0) {
1342
- this.timeScale(this._totalDuration / value);
1343
- }
1344
- return this;
1344
+ return (value && this.totalDuration()) ? this.timeScale(this._totalDuration / value) : this;
1345
1345
  };
1346
1346
 
1347
1347
  p.paused = function(value) {
@@ -1373,7 +1373,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1373
1373
  return TimelineLite;
1374
1374
 
1375
1375
  }, true);
1376
-
1376
+
1377
1377
 
1378
1378
 
1379
1379
 
@@ -1410,7 +1410,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1410
1410
 
1411
1411
  p.constructor = TimelineMax;
1412
1412
  p.kill()._gc = false;
1413
- TimelineMax.version = "1.18.0";
1413
+ TimelineMax.version = "1.18.1";
1414
1414
 
1415
1415
  p.invalidate = function() {
1416
1416
  this._yoyo = (this.vars.yoyo === true);
@@ -1490,8 +1490,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1490
1490
  prevRawPrevTime = this._rawPrevTime,
1491
1491
  prevPaused = this._paused,
1492
1492
  prevCycle = this._cycle,
1493
- tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween;
1494
- if (time >= totalDur) {
1493
+ tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime;
1494
+ if (time >= totalDur - 0.0000001) { //to work around occasional floating point math artifacts.
1495
1495
  if (!this._locked) {
1496
1496
  this._totalTime = totalDur;
1497
1497
  this._cycle = this._repeat;
@@ -1500,7 +1500,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1500
1500
  isComplete = true;
1501
1501
  callback = "onComplete";
1502
1502
  internalForce = !!this._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline.
1503
- if (this._duration === 0) if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {
1503
+ if (this._duration === 0) if ((time <= 0 && time >= -0.0000001) || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {
1504
1504
  internalForce = true;
1505
1505
  if (prevRawPrevTime > _tinyNum) {
1506
1506
  callback = "onReverseComplete";
@@ -1639,6 +1639,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1639
1639
  this._callback("onRepeat");
1640
1640
  }
1641
1641
  }
1642
+ if (prevTime !== this._time) { //in case there's a callback like onComplete in a nested tween/timeline that changes the playhead position, like via seek(), we should just abort.
1643
+ return;
1644
+ }
1642
1645
  if (wrap) {
1643
1646
  prevTime = (backwards) ? dur + 0.0001 : -0.0001;
1644
1647
  this.render(prevTime, true, false);
@@ -1670,11 +1673,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1670
1673
  this._callback("onStart");
1671
1674
  }
1672
1675
 
1673
- if (this._time >= prevTime) {
1676
+ curTime = this._time;
1677
+ if (curTime >= prevTime) {
1674
1678
  tween = this._first;
1675
1679
  while (tween) {
1676
1680
  next = tween._next; //record it here because the value could change after rendering...
1677
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
1681
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
1678
1682
  break;
1679
1683
  } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {
1680
1684
  if (pauseTween === tween) {
@@ -1692,7 +1696,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1692
1696
  tween = this._last;
1693
1697
  while (tween) {
1694
1698
  next = tween._prev; //record it here because the value could change after rendering...
1695
- if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
1699
+ if (curTime !== this._time || (this._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
1696
1700
  break;
1697
1701
  } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {
1698
1702
  if (pauseTween === tween) {
@@ -1823,7 +1827,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1823
1827
  }
1824
1828
  return this._totalDuration;
1825
1829
  }
1826
- return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) );
1830
+ return (this._repeat === -1 || !value) ? this : this.timeScale( this.totalDuration() / value );
1827
1831
  };
1828
1832
 
1829
1833
  p.time = function(value, suppressEvents) {
@@ -2499,7 +2503,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2499
2503
  p = CSSPlugin.prototype = new TweenPlugin("css");
2500
2504
 
2501
2505
  p.constructor = CSSPlugin;
2502
- CSSPlugin.version = "1.18.0";
2506
+ CSSPlugin.version = "1.18.1";
2503
2507
  CSSPlugin.API = 2;
2504
2508
  CSSPlugin.defaultTransformPerspective = 0;
2505
2509
  CSSPlugin.defaultSkewType = "compensated";
@@ -2980,7 +2984,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2980
2984
  }
2981
2985
  return parsed;
2982
2986
  },
2983
- _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
2987
+ _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
2984
2988
 
2985
2989
  for (p in _colorLookup) {
2986
2990
  _colorExp += "|" + p + "\\b";
@@ -3097,7 +3101,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3097
3101
  proxy = d.proxy,
3098
3102
  mpt = d.firstMPT,
3099
3103
  min = 0.000001,
3100
- val, pt, i, str;
3104
+ val, pt, i, str, p;
3101
3105
  while (mpt) {
3102
3106
  val = proxy[mpt.v];
3103
3107
  if (mpt.r) {
@@ -3111,19 +3115,20 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3111
3115
  if (d.autoRotate) {
3112
3116
  d.autoRotate.rotation = proxy.rotation;
3113
3117
  }
3114
- //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method.
3115
- if (v === 1) {
3118
+ //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method. Same for "b" at the beginning.
3119
+ if (v === 1 || v === 0) {
3116
3120
  mpt = d.firstMPT;
3121
+ p = (v === 1) ? "e" : "b";
3117
3122
  while (mpt) {
3118
3123
  pt = mpt.t;
3119
3124
  if (!pt.type) {
3120
- pt.e = pt.s + pt.xs0;
3125
+ pt[p] = pt.s + pt.xs0;
3121
3126
  } else if (pt.type === 1) {
3122
3127
  str = pt.xs0 + pt.s + pt.xs1;
3123
3128
  for (i = 1; i < pt.l; i++) {
3124
3129
  str += pt["xn"+i] + pt["xs"+(i+1)];
3125
3130
  }
3126
- pt.e = str;
3131
+ pt[p] = str;
3127
3132
  }
3128
3133
  mpt = mpt._next;
3129
3134
  }
@@ -3349,7 +3354,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3349
3354
 
3350
3355
  //if no number is found, treat it as a non-tweening value and just append the string to the current xs.
3351
3356
  if (!bnums) {
3352
- pt["xs" + pt.l] += pt.l ? " " + bv : bv;
3357
+ pt["xs" + pt.l] += pt.l ? " " + ev : ev;
3353
3358
 
3354
3359
  //loop through all the numbers that are found and construct the extra values on the pt.
3355
3360
  } else {
@@ -3794,7 +3799,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3794
3799
  a32 = t3;
3795
3800
  }
3796
3801
  //rotationY
3797
- angle = Math.atan2(a13, a33);
3802
+ angle = Math.atan2(-a31, a33);
3798
3803
  tm.rotationY = angle * _RAD2DEG;
3799
3804
  if (angle) {
3800
3805
  cos = Math.cos(-angle);
@@ -3824,7 +3829,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3824
3829
 
3825
3830
  if (tm.rotationX && Math.abs(tm.rotationX) + Math.abs(tm.rotation) > 359.9) { //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.
3826
3831
  tm.rotationX = tm.rotation = 0;
3827
- tm.rotationY += 180;
3832
+ tm.rotationY = 180 - tm.rotationY;
3828
3833
  }
3829
3834
 
3830
3835
  tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21) * rnd + 0.5) | 0) / rnd;
@@ -4007,7 +4012,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
4007
4012
  a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43,
4008
4013
  zOrigin, min, cos, sin, t1, t2, transform, comma, zero, skew, rnd;
4009
4014
  //check to see if we should render as 2D (and SVGs must use 2D when _useSVGTransformAttr is true)
4010
- if (((((v === 1 || v === 0) && force3D === "auto" && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !force3D) && !z && !perspective && !rotationY && !rotationX) || (_useSVGTransformAttr && isSVG) || !_supports3D) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices. Check the tween's totalTime/totalDuration too in order to make sure it doesn't happen between repeats if it's a repeating tween.
4015
+ 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.
4011
4016
 
4012
4017
  //2D
4013
4018
  if (angle || t.skewX || isSVG) {
@@ -4197,7 +4202,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
4197
4202
  transform = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d(");
4198
4203
  transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31);
4199
4204
  transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22);
4200
- if (rotationX || rotationY) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations)
4205
+ if (rotationX || rotationY || sz !== 1) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations)
4201
4206
  transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13);
4202
4207
  transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma;
4203
4208
  } else {
@@ -4640,6 +4645,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
4640
4645
  if (transform) {
4641
4646
  if (transform.svg) {
4642
4647
  this.t.removeAttribute("data-svg-origin");
4648
+ this.t.removeAttribute("transform");
4643
4649
  }
4644
4650
  delete this.t._gsTransform;
4645
4651
  }
@@ -4840,7 +4846,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
4840
4846
  bs = bn + "%";
4841
4847
  }
4842
4848
 
4843
- } else if (esfx === "em" || esfx === "rem") {
4849
+ } else if (esfx === "em" || esfx === "rem" || esfx === "vw" || esfx === "vh") {
4844
4850
  bn /= _convertToPixels(target, p, 1, esfx);
4845
4851
 
4846
4852
  //otherwise convert to pixels.
@@ -5974,7 +5980,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
5974
5980
  _class("Ticker", function(fps, useRAF) {
5975
5981
  var _self = this,
5976
5982
  _startTime = _getTime(),
5977
- _useRAF = (useRAF !== false && _reqAnimFrame),
5983
+ _useRAF = (useRAF !== false && _reqAnimFrame) ? "auto" : false,
5978
5984
  _lagThreshold = 500,
5979
5985
  _adjustedLag = 33,
5980
5986
  _tickWord = "tick", //helps reduce gc burden
@@ -6028,9 +6034,11 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6028
6034
  }
6029
6035
  };
6030
6036
 
6031
- _self.wake = function() {
6037
+ _self.wake = function(seamless) {
6032
6038
  if (_id !== null) {
6033
6039
  _self.sleep();
6040
+ } else if (seamless) {
6041
+ _startTime += -_lastUpdate + (_lastUpdate = _getTime());
6034
6042
  } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout().
6035
6043
  _lastUpdate = _getTime() - _lagThreshold + 5;
6036
6044
  }
@@ -6063,7 +6071,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6063
6071
 
6064
6072
  //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.
6065
6073
  setTimeout(function() {
6066
- if (_useRAF && _self.frame < 5) {
6074
+ if (_useRAF === "auto" && _self.frame < 5 && document.visibilityState !== "hidden") {
6067
6075
  _self.useRAF(false);
6068
6076
  }
6069
6077
  }, 1500);
@@ -6610,7 +6618,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6610
6618
  p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
6611
6619
  p._notifyPluginsOfEnabled = p._lazy = false;
6612
6620
 
6613
- TweenLite.version = "1.18.0";
6621
+ TweenLite.version = "1.18.1";
6614
6622
  TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
6615
6623
  TweenLite.defaultOverwrite = "auto";
6616
6624
  TweenLite.ticker = _ticker;
@@ -6724,7 +6732,8 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6724
6732
  blob = _blobDif(s, end, stringFilter || TweenLite.defaultStringFilter, pt);
6725
6733
  pt = {t:blob, p:"setRatio", s:0, c:1, f:2, pg:0, n:overwriteProp || prop, pr:0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example.
6726
6734
  } else if (!isRelative) {
6727
- pt.c = (parseFloat(end) - parseFloat(s)) || 0;
6735
+ pt.s = parseFloat(s);
6736
+ pt.c = (parseFloat(end) - pt.s) || 0;
6728
6737
  }
6729
6738
  }
6730
6739
  if (pt.c) { //only add it to the linked list if there's a change.
@@ -7069,7 +7078,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
7069
7078
  duration = this._duration,
7070
7079
  prevRawPrevTime = this._rawPrevTime,
7071
7080
  isComplete, callback, pt, rawPrevTime;
7072
- if (time >= duration) {
7081
+ if (time >= duration - 0.0000001) { //to work around occasional floating point math artifacts.
7073
7082
  this._totalTime = this._time = duration;
7074
7083
  this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;
7075
7084
  if (!this._reversed ) {
@@ -7081,7 +7090,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
7081
7090
  if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
7082
7091
  time = 0;
7083
7092
  }
7084
- if (time === 0 || prevRawPrevTime < 0 || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause.
7093
+ if (prevRawPrevTime < 0 || (time <= 0 && time >= -0.0000001) || (prevRawPrevTime === _tinyNum && this.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause.
7085
7094
  force = true;
7086
7095
  if (prevRawPrevTime > _tinyNum) {
7087
7096
  callback = "onReverseComplete";
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.18.0
3
- * DATE: 2015-09-05
2
+ * VERSION: 1.18.1
3
+ * DATE: 2015-12-11
4
4
  * UPDATES AND DOCS AT: http://greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
@@ -31,7 +31,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
31
31
  p = CSSPlugin.prototype = new TweenPlugin("css");
32
32
 
33
33
  p.constructor = CSSPlugin;
34
- CSSPlugin.version = "1.18.0";
34
+ CSSPlugin.version = "1.18.1";
35
35
  CSSPlugin.API = 2;
36
36
  CSSPlugin.defaultTransformPerspective = 0;
37
37
  CSSPlugin.defaultSkewType = "compensated";
@@ -512,7 +512,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
512
512
  }
513
513
  return parsed;
514
514
  },
515
- _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
515
+ _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
516
516
 
517
517
  for (p in _colorLookup) {
518
518
  _colorExp += "|" + p + "\\b";
@@ -629,7 +629,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
629
629
  proxy = d.proxy,
630
630
  mpt = d.firstMPT,
631
631
  min = 0.000001,
632
- val, pt, i, str;
632
+ val, pt, i, str, p;
633
633
  while (mpt) {
634
634
  val = proxy[mpt.v];
635
635
  if (mpt.r) {
@@ -643,19 +643,20 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
643
643
  if (d.autoRotate) {
644
644
  d.autoRotate.rotation = proxy.rotation;
645
645
  }
646
- //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method.
647
- if (v === 1) {
646
+ //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method. Same for "b" at the beginning.
647
+ if (v === 1 || v === 0) {
648
648
  mpt = d.firstMPT;
649
+ p = (v === 1) ? "e" : "b";
649
650
  while (mpt) {
650
651
  pt = mpt.t;
651
652
  if (!pt.type) {
652
- pt.e = pt.s + pt.xs0;
653
+ pt[p] = pt.s + pt.xs0;
653
654
  } else if (pt.type === 1) {
654
655
  str = pt.xs0 + pt.s + pt.xs1;
655
656
  for (i = 1; i < pt.l; i++) {
656
657
  str += pt["xn"+i] + pt["xs"+(i+1)];
657
658
  }
658
- pt.e = str;
659
+ pt[p] = str;
659
660
  }
660
661
  mpt = mpt._next;
661
662
  }
@@ -881,7 +882,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
881
882
 
882
883
  //if no number is found, treat it as a non-tweening value and just append the string to the current xs.
883
884
  if (!bnums) {
884
- pt["xs" + pt.l] += pt.l ? " " + bv : bv;
885
+ pt["xs" + pt.l] += pt.l ? " " + ev : ev;
885
886
 
886
887
  //loop through all the numbers that are found and construct the extra values on the pt.
887
888
  } else {
@@ -1326,7 +1327,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1326
1327
  a32 = t3;
1327
1328
  }
1328
1329
  //rotationY
1329
- angle = Math.atan2(a13, a33);
1330
+ angle = Math.atan2(-a31, a33);
1330
1331
  tm.rotationY = angle * _RAD2DEG;
1331
1332
  if (angle) {
1332
1333
  cos = Math.cos(-angle);
@@ -1356,7 +1357,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1356
1357
 
1357
1358
  if (tm.rotationX && Math.abs(tm.rotationX) + Math.abs(tm.rotation) > 359.9) { //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.
1358
1359
  tm.rotationX = tm.rotation = 0;
1359
- tm.rotationY += 180;
1360
+ tm.rotationY = 180 - tm.rotationY;
1360
1361
  }
1361
1362
 
1362
1363
  tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21) * rnd + 0.5) | 0) / rnd;
@@ -1539,7 +1540,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1539
1540
  a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43,
1540
1541
  zOrigin, min, cos, sin, t1, t2, transform, comma, zero, skew, rnd;
1541
1542
  //check to see if we should render as 2D (and SVGs must use 2D when _useSVGTransformAttr is true)
1542
- if (((((v === 1 || v === 0) && force3D === "auto" && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !force3D) && !z && !perspective && !rotationY && !rotationX) || (_useSVGTransformAttr && isSVG) || !_supports3D) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices. Check the tween's totalTime/totalDuration too in order to make sure it doesn't happen between repeats if it's a repeating tween.
1543
+ 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.
1543
1544
 
1544
1545
  //2D
1545
1546
  if (angle || t.skewX || isSVG) {
@@ -1729,7 +1730,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1729
1730
  transform = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d(");
1730
1731
  transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31);
1731
1732
  transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22);
1732
- if (rotationX || rotationY) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations)
1733
+ if (rotationX || rotationY || sz !== 1) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations)
1733
1734
  transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13);
1734
1735
  transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma;
1735
1736
  } else {
@@ -2172,6 +2173,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2172
2173
  if (transform) {
2173
2174
  if (transform.svg) {
2174
2175
  this.t.removeAttribute("data-svg-origin");
2176
+ this.t.removeAttribute("transform");
2175
2177
  }
2176
2178
  delete this.t._gsTransform;
2177
2179
  }
@@ -2372,7 +2374,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2372
2374
  bs = bn + "%";
2373
2375
  }
2374
2376
 
2375
- } else if (esfx === "em" || esfx === "rem") {
2377
+ } else if (esfx === "em" || esfx === "rem" || esfx === "vw" || esfx === "vh") {
2376
2378
  bn /= _convertToPixels(target, p, 1, esfx);
2377
2379
 
2378
2380
  //otherwise convert to pixels.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: beta 1.4.0
3
- * DATE: 2015-09-03
2
+ * VERSION: beta 1.4.1
3
+ * DATE: 2015-11-04
4
4
  * UPDATES AND DOCS AT: http://greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
@@ -116,7 +116,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
116
116
  return a;
117
117
  },
118
118
  _formatColors = function(s, toHSL) {
119
- var colors = s.match(_colorExp) || [],
119
+ var colors = (s + "").match(_colorExp) || [],
120
120
  charIndex = 0,
121
121
  parsed = colors.length ? "" : s,
122
122
  i, color, temp;
@@ -133,29 +133,31 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
133
133
  return parsed;
134
134
  }, p, _colorStringFilter,
135
135
  TweenLite = _gsScope.TweenLite,
136
- _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b", //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
137
-
138
-
136
+ _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b", //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
139
137
 
140
138
  ColorPropsPlugin = _gsScope._gsDefine.plugin({
141
139
  propName: "colorProps",
142
- version: "1.4.0",
140
+ version: "1.4.1",
143
141
  priority: -1,
144
142
  API: 2,
145
143
  global: true,
146
144
 
147
145
  //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
148
146
  init: function(target, value, tween) {
149
- var p, proxy, pt;
147
+ var p, proxy, pt, val;
150
148
  this._target = target;
151
149
  this._proxy = proxy = ((value.format + "").toUpperCase() === "NUMBER") ? {} : 0;
152
150
  for (p in value) {
153
151
  if (p !== "format") {
154
152
  if (proxy) {
155
153
  this._firstNumPT = pt = {_next:this._firstNumPT, t:target, p:p, f:(typeof(target[p]) === "function")};
156
- proxy[p] = !pt.f ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]();
154
+ proxy[p] = "rgb(" + _parseColor(!pt.f ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]()).join(",") + ")";
155
+ val = value[p];
156
+ this._addTween(proxy, p, "get", ((typeof(val) === "number") ? "rgb(" + _parseColor(val, false).join(",") + ")" : val), p, null, null, _colorStringFilter);
157
+ } else {
158
+ this._addTween(target, p, "get", value[p], p, null, null, _colorStringFilter);
157
159
  }
158
- this._addTween(proxy || target, p, "get", value[p], p, null, null, _colorStringFilter);
160
+
159
161
  }
160
162
  }
161
163
  return true;
@@ -183,7 +185,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
183
185
  _colorExp += "|" + p + "\\b";
184
186
  }
185
187
  _colorExp = new RegExp(_colorExp+")", "gi");
186
-
187
188
  ColorPropsPlugin.colorStringFilter = _colorStringFilter = function(a) {
188
189
  var combined = a[0] + a[1],
189
190
  toHSL;
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.7.5
3
- * DATE: 2015-02-26
2
+ * VERSION: 1.7.6
3
+ * DATE: 2015-12-10
4
4
  * UPDATES AND DOCS AT: http://greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
@@ -27,7 +27,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
27
27
  ScrollToPlugin = _gsScope._gsDefine.plugin({
28
28
  propName: "scrollTo",
29
29
  API: 2,
30
- version:"1.7.5",
30
+ version:"1.7.6",
31
31
 
32
32
  //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
33
33
  init: function(target, value, tween) {
@@ -65,6 +65,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
65
65
  yDif = y - this.yPrev,
66
66
  xDif = x - this.xPrev;
67
67
 
68
+ if (this.x < 0) { //can't scroll to a position less than 0! Might happen if someone uses a Back.easeOut or Elastic.easeOut when scrolling back to the top of the page (for example)
69
+ this.x = 0;
70
+ }
71
+ if (this.y < 0) {
72
+ this.y = 0;
73
+ }
68
74
  if (this._autoKill) {
69
75
  //note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match.
70
76
  if (!this.skipX && (xDif > 7 || xDif < -7) && x < _max(this._target, "x")) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 0.14.1
3
- * DATE: 2015-09-05
2
+ * VERSION: 0.14.2
3
+ * DATE: 2015-12-11
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/).
@@ -62,6 +62,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
62
62
  for (i = 0; i !== l; b.push(a[i++]));
63
63
  return b;
64
64
  },
65
+ _copy = function(obj) {
66
+ var copy = {}, p;
67
+ for (p in obj) {
68
+ copy[p] = obj[p];
69
+ }
70
+ return copy;
71
+ },
65
72
  ThrowPropsPlugin,
66
73
 
67
74
  _renderQueueTick = function() {
@@ -324,7 +331,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
324
331
  style.border = "0px solid red";
325
332
  style.transform = "none";
326
333
  // in some browsers (like certain flavors of Android), the getScreenCTM() matrix is contaminated by the scroll position. We can run some logic here to detect that condition, but we ended up not needing this because we found another workaround using getBoundingClientRect().
327
- div.style.cssText = "width:100px;height:100px;overflow:scroll";
334
+ div.style.cssText = "width:100px;height:100px;overflow:scroll;-ms-overflow-style:none;";
328
335
  parent.appendChild(div);
329
336
  div.appendChild(svg);
330
337
  point = svg.createSVGPoint().matrixTransform(svg.getScreenCTM());
@@ -1103,7 +1110,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1103
1110
  if (!ThrowPropsPlugin) {
1104
1111
  ThrowPropsPlugin = _globals.com.greensock.plugins.ThrowPropsPlugin;
1105
1112
  }
1106
- this.vars = vars = vars || {};
1113
+ this.vars = vars = _copy(vars || {});
1107
1114
  this.target = target;
1108
1115
  this.x = this.y = this.rotation = 0;
1109
1116
  this.dragResistance = parseFloat(vars.dragResistance) || 0;
@@ -1126,11 +1133,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1126
1133
  dragEndTime = 0,
1127
1134
  checkAutoScrollBounds = false,
1128
1135
  isClickable = vars.clickableTest || _isClickable,
1129
- enabled, scrollProxy, startPointerX, startPointerY, startElementX, startElementY, hasBounds, hasDragCallback, maxX, minX, maxY, minY, tempVars, cssVars, touch, touchID, rotationOrigin, dirty, old, snapX, snapY, isClicking, touchEventTarget, matrix, interrupted, clickTime, startScrollTop, startScrollLeft, applyObj, allowNativeTouchScrolling, touchDragAxis, isDispatching,
1130
-
1136
+ enabled, scrollProxy, startPointerX, startPointerY, startElementX, startElementY, hasBounds, hasDragCallback, maxX, minX, maxY, minY, tempVars, cssVars, touch, touchID, rotationOrigin, dirty, old, snapX, snapY, isClicking, touchEventTarget, matrix, interrupted, clickTime, startScrollTop, startScrollLeft, applyObj, allowNativeTouchScrolling, touchDragAxis, isDispatching, clickDispatch,
1131
1137
  //this method gets called on every tick of TweenLite.ticker which allows us to synchronize the renders to the core engine (which is typically synchronized with the display refresh via requestAnimationFrame). This is an optimization - it's better than applying the values inside the "mousemove" or "touchmove" event handler which may get called many times inbetween refreshes.
1132
1138
  render = function(suppressEvents) {
1133
- if (self.autoScroll && self.isDragging && (dirty || checkAutoScrollBounds)) {
1139
+ if (self.autoScroll && (checkAutoScrollBounds || (self.isDragging && dirty))) {
1134
1140
  var e = target,
1135
1141
  autoScrollFactor = self.autoScroll * 15, //multiplying by 15 just gives us a better "feel" speed-wise.
1136
1142
  parent, isRoot, rect, pointerX, pointerY, changeX, changeY, gap;
@@ -1145,7 +1151,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1145
1151
  rect = isRoot ? {bottom:Math.max(_docElement.clientHeight, window.innerHeight || 0), right: Math.max(_docElement.clientWidth, window.innerWidth || 0), left:0, top:0} : parent.getBoundingClientRect();
1146
1152
  changeX = changeY = 0;
1147
1153
  if (allowY) {
1148
- if (pointerY > rect.bottom - 40 && (gap = parent._gsMaxScrollY - parent.scrollTop)) {
1154
+ gap = parent._gsMaxScrollY - parent.scrollTop;
1155
+ if (gap < 0) {
1156
+ changeY = gap;
1157
+ } else if (pointerY > rect.bottom - 40 && gap) {
1149
1158
  checkAutoScrollBounds = true;
1150
1159
  changeY = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.bottom - pointerY)) / 40)) | 0);
1151
1160
  } else if (pointerY < rect.top + 40 && parent.scrollTop) {
@@ -1156,9 +1165,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1156
1165
  parent.scrollTop += changeY;
1157
1166
  }
1158
1167
  }
1159
-
1160
1168
  if (allowX) {
1161
- if (pointerX > rect.right - 40 && (gap = parent._gsMaxScrollX - parent.scrollLeft)) {
1169
+ gap = parent._gsMaxScrollX - parent.scrollLeft;
1170
+ if (gap < 0) {
1171
+ changeX = gap;
1172
+ } else if (pointerX > rect.right - 40 && gap) {
1162
1173
  checkAutoScrollBounds = true;
1163
1174
  changeX = Math.min(gap, (autoScrollFactor * (1 - Math.max(0, (rect.right - pointerX)) / 40)) | 0);
1164
1175
  } else if (pointerX < rect.left + 40 && parent.scrollLeft) {
@@ -1384,10 +1395,26 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1384
1395
  },
1385
1396
 
1386
1397
  updateMatrix = function() {
1398
+ var start = matrix || [1,0,0,1,0,0],
1399
+ a, b, c, d, tx, ty, determinant, pointerX, pointerY;
1387
1400
  matrix = _getConcatenatedMatrix(target.parentNode, true);
1401
+ if (self.isPressed && start.join(",") !== matrix.join(",")) { //if the matrix changes WHILE the element is pressed, we must adjust the startPointerX and startPointerY accordingly, so we invert the original matrix and figure out where the pointerX and pointerY were in the global space, then apply the new matrix to get the updated coordinates.
1402
+ a = start[0];
1403
+ b = start[1];
1404
+ c = start[2];
1405
+ d = start[3];
1406
+ tx = start[4];
1407
+ ty = start[5];
1408
+ determinant = (a * d - b * c);
1409
+ pointerX = startPointerX * (d / determinant) + startPointerY * (-c / determinant) + ((c * ty - d * tx) / determinant);
1410
+ pointerY = startPointerX * (-b / determinant) + startPointerY * (a / determinant) + (-(a * ty - b * tx) / determinant);
1411
+ startPointerY = pointerX * matrix[1] + pointerY * matrix[3] + matrix[5];
1412
+ startPointerX = pointerX * matrix[0] + pointerY * matrix[2] + matrix[4];
1413
+ }
1388
1414
  if (!matrix[1] && !matrix[2] && matrix[0] == 1 && matrix[3] == 1 && matrix[4] == 0 && matrix[5] == 0) { //if there are no transforms, we can optimize performance by not factoring in the matrix
1389
1415
  matrix = null;
1390
1416
  }
1417
+
1391
1418
  },
1392
1419
 
1393
1420
  recordStartPositions = function() {
@@ -1780,15 +1807,18 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1780
1807
  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".
1781
1808
  _dispatchEvent(self, "click", "onClick");
1782
1809
  eventTarget = originalEvent.target || originalEvent.srcElement || target; //old IE uses srcElement
1783
- if (eventTarget.click) { //some browsers (like mobile Safari) don't properly trigger the click event
1784
- eventTarget.click();
1785
- }
1786
- else if (_doc.createEvent) {
1787
- syntheticEvent = _doc.createEvent("MouseEvents");
1788
- syntheticEvent.initEvent("click", true, true);
1789
- eventTarget.dispatchEvent(syntheticEvent);
1790
- }
1791
1810
  clickTime = _getTime();
1811
+ TweenLite.delayedCall(0.00001, 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.
1812
+ if (clickTime !== clickDispatch && self.enabled() && !self.isPressed) {
1813
+ if (eventTarget.click) { //some browsers (like mobile Safari) don't properly trigger the click event
1814
+ eventTarget.click();
1815
+ } else if (_doc.createEvent) {
1816
+ syntheticEvent = _doc.createEvent("MouseEvents");
1817
+ syntheticEvent.initMouseEvent("click", true, true, window, 1, self.pointerEvent.screenX, self.pointerEvent.screenY, self.pointerX, self.pointerY, false, false, false, false, 0, null);
1818
+ eventTarget.dispatchEvent(syntheticEvent);
1819
+ }
1820
+ }
1821
+ });
1792
1822
  }
1793
1823
  } else {
1794
1824
  animate(vars.throwProps); //will skip if throwProps isn't defined or ThrowPropsPlugin isn't loaded.
@@ -1825,6 +1855,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1825
1855
  var time = _getTime(),
1826
1856
  recentlyClicked = time - clickTime < 40,
1827
1857
  recentlyDragged = time - dragEndTime < 40;
1858
+ if (recentlyClicked && clickDispatch !== clickTime) {
1859
+ clickDispatch = clickTime;
1860
+ return;
1861
+ }
1828
1862
  if (self.isPressed || recentlyDragged || recentlyClicked) {
1829
1863
  if (e.preventDefault) {
1830
1864
  e.preventDefault();
@@ -1942,6 +1976,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1942
1976
  if (self.isPressed && ((allowX && Math.abs(x - self.x) > 0.01) || (allowY && (Math.abs(y - self.y) > 0.01 && !rotationMode)))) {
1943
1977
  recordStartPositions();
1944
1978
  }
1979
+ if (self.autoScroll) {
1980
+ _recordMaxScrolls(target.parentNode);
1981
+ checkAutoScrollBounds = true;
1982
+ render();
1983
+ }
1945
1984
  return self;
1946
1985
  };
1947
1986
 
@@ -2083,7 +2122,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2083
2122
  p.constructor = Draggable;
2084
2123
  p.pointerX = p.pointerY = 0;
2085
2124
  p.isDragging = p.isPressed = false;
2086
- Draggable.version = "0.14.1";
2125
+ Draggable.version = "0.14.2";
2087
2126
  Draggable.zIndex = 1000;
2088
2127
 
2089
2128
  _addListener(_doc, "touchcancel", function() {
@@ -2122,9 +2161,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2122
2161
  _oldIERect = function(e) { //IE8 doesn't support getBoundingClientRect(), so we use this as a backup.
2123
2162
  var top = 0,
2124
2163
  left = 0,
2125
- width = e.offsetWidth,
2126
- height = e.offsetHeight;
2164
+ width, height;
2127
2165
  e = _unwrapElement(e);
2166
+ width = e.offsetWidth;
2167
+ height = e.offsetHeight;
2128
2168
  while(e) {
2129
2169
  top += e.offsetTop;
2130
2170
  left += e.offsetLeft;
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greensock-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0.1
4
+ version: 1.18.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Pataki, Greensock Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-15 00:00:00.000000000 Z
11
+ date: 2016-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: This gem provides TweenMax, TweenLite, TimelineMax, TimelineLite, and
@@ -46,21 +46,15 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - LICENSE.txt
50
- - README.md
51
- - lib/greensock/rails.rb
52
49
  - lib/greensock/rails/version.rb
53
- - vendor/assets/javascripts/greensock/TimelineLite.js
54
- - vendor/assets/javascripts/greensock/TimelineMax.js
55
- - vendor/assets/javascripts/greensock/TweenLite.js
56
- - vendor/assets/javascripts/greensock/TweenMax.js
50
+ - lib/greensock/rails.rb
57
51
  - vendor/assets/javascripts/greensock/easing/EasePack.js
58
52
  - vendor/assets/javascripts/greensock/jquery.gsap.js
59
53
  - vendor/assets/javascripts/greensock/plugins/AttrPlugin.js
60
54
  - vendor/assets/javascripts/greensock/plugins/BezierPlugin.js
55
+ - vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js
61
56
  - vendor/assets/javascripts/greensock/plugins/CSSPlugin.js
62
57
  - vendor/assets/javascripts/greensock/plugins/CSSRulePlugin.js
63
- - vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js
64
58
  - vendor/assets/javascripts/greensock/plugins/DirectionalRotationPlugin.js
65
59
  - vendor/assets/javascripts/greensock/plugins/EaselPlugin.js
66
60
  - vendor/assets/javascripts/greensock/plugins/EndArrayPlugin.js
@@ -70,7 +64,13 @@ files:
70
64
  - vendor/assets/javascripts/greensock/plugins/ScrollToPlugin.js
71
65
  - vendor/assets/javascripts/greensock/plugins/TEMPLATE_Plugin.js
72
66
  - vendor/assets/javascripts/greensock/plugins/TextPlugin.js
67
+ - vendor/assets/javascripts/greensock/TimelineLite.js
68
+ - vendor/assets/javascripts/greensock/TimelineMax.js
69
+ - vendor/assets/javascripts/greensock/TweenLite.js
70
+ - vendor/assets/javascripts/greensock/TweenMax.js
73
71
  - vendor/assets/javascripts/greensock/utils/Draggable.js
72
+ - LICENSE.txt
73
+ - README.md
74
74
  homepage: https://rubygems.org/gems/greensock-rails/
75
75
  licenses:
76
76
  - Copyright (c) 2014, GreenSock.
@@ -81,17 +81,17 @@ require_paths:
81
81
  - lib
82
82
  required_ruby_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - ">="
84
+ - - '>='
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ">="
89
+ - - '>='
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.4.5.1
94
+ rubygems_version: 2.0.14
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Use GSAP with Rails 3.1 or later