greensock-rails 1.13.2.0 → 1.14.0.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: b25cb7670b6ba9df19940ad19b98c380f821c392
4
- data.tar.gz: 5c61aad86d6082b7ac861096ad2344de4cc93aaa
3
+ metadata.gz: 7c613284653d7244065c5ab399dcad3ec0f12b57
4
+ data.tar.gz: 78febc6daf4ec98e7ae3b43fe221061b57e4e22e
5
5
  SHA512:
6
- metadata.gz: ab119b2c6f6066c579b47766b744e40483419485b532d7bbec487445de3b2871bd13e150b445d321bd4d6b277b4ec567ec0076439aee631559838778229a7f4f
7
- data.tar.gz: a00476f291d8c599b8cd4ecaa644157f1e57e0eb4104c6dfa941d06b2244855a3ab0eeea16c057f5f712dccb44c8d586019f40588813cf94f0369cd9c4885d56
6
+ metadata.gz: 4cbb8e68c11ae1ed8d4e8092b63df818ac89c54056277de3681e79606780286bffa42d1062e4822649b49ac03ea7549f2326e769e72104b81c8cf05a7b87eb58
7
+ data.tar.gz: 80d1918794907765ffacbbebee4033722606bfe81f24d95e2f469327d2135e034e4df51c54e4842d575a894f79fb1ab00813669d38cc722ed32c1b5eed5af649
@@ -1,5 +1,5 @@
1
1
  module Greensock
2
2
  module Rails
3
- VERSION = "1.13.2.0"
3
+ VERSION = "1.14.0.0"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.13.2
3
- * DATE: 2014-08-23
2
+ * VERSION: 1.14.0
3
+ * DATE: 2014-10-14
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -71,7 +71,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
71
71
  },
72
72
  p = TimelineLite.prototype = new SimpleTimeline();
73
73
 
74
- TimelineLite.version = "1.13.2";
74
+ TimelineLite.version = "1.14.0";
75
75
  p.constructor = TimelineLite;
76
76
  p.kill()._gc = p._forcingPlayhead = false;
77
77
 
@@ -117,10 +117,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
117
117
  if (typeof(targets) === "string") {
118
118
  targets = TweenLite.selector(targets) || targets;
119
119
  }
120
+ targets = targets || [];
120
121
  if (_isSelector(targets)) { //senses if the targets object is a selector. If it is, we should translate it into an array.
121
122
  targets = _slice(targets);
122
123
  }
123
124
  stagger = stagger || 0;
125
+ if (stagger < 0) {
126
+ targets = _slice(targets);
127
+ targets.reverse();
128
+ stagger *= -1;
129
+ }
124
130
  for (i = 0; i < targets.length; i++) {
125
131
  if (vars.startAt) {
126
132
  vars.startAt = _copy(vars.startAt);
@@ -516,6 +522,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
516
522
  }
517
523
  return a;
518
524
  };
525
+
526
+ p.recent = function() {
527
+ return this._recent;
528
+ };
519
529
 
520
530
  p._contains = function(tween) {
521
531
  var tl = tween.timeline;
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.13.2
3
- * DATE: 2014-08-23
2
+ * VERSION: 1.14.0
3
+ * DATE: 2014-10-10
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, 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.13.2";
37
+ TimelineMax.version = "1.14.0";
38
38
 
39
39
  p.invalidate = function() {
40
40
  this._yoyo = (this.vars.yoyo === true);
@@ -518,7 +518,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
518
518
  },
519
519
  p = TimelineLite.prototype = new SimpleTimeline();
520
520
 
521
- TimelineLite.version = "1.13.2";
521
+ TimelineLite.version = "1.14.0";
522
522
  p.constructor = TimelineLite;
523
523
  p.kill()._gc = p._forcingPlayhead = false;
524
524
 
@@ -568,6 +568,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
568
568
  targets = _slice(targets);
569
569
  }
570
570
  stagger = stagger || 0;
571
+ if (stagger < 0) {
572
+ targets = _slice(targets);
573
+ targets.reverse();
574
+ stagger *= -1;
575
+ }
571
576
  for (i = 0; i < targets.length; i++) {
572
577
  if (vars.startAt) {
573
578
  vars.startAt = _copy(vars.startAt);
@@ -964,6 +969,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
964
969
  return a;
965
970
  };
966
971
 
972
+ p.recent = function() {
973
+ return this._recent;
974
+ };
975
+
967
976
  p._contains = function(tween) {
968
977
  var tl = tween.timeline;
969
978
  while (tl) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.13.2
3
- * DATE: 2014-08-23
2
+ * VERSION: 1.14.0
3
+ * DATE: 2014-10-14
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -253,10 +253,12 @@
253
253
  t = this._eventTarget;
254
254
  while (--i > -1) {
255
255
  listener = list[i];
256
- if (listener.up) {
257
- listener.c.call(listener.s || t, {type:type, target:t});
258
- } else {
259
- listener.c.call(listener.s || t);
256
+ if (listener) {
257
+ if (listener.up) {
258
+ listener.c.call(listener.s || t, {type:type, target:t});
259
+ } else {
260
+ listener.c.call(listener.s || t);
261
+ }
260
262
  }
261
263
  }
262
264
  }
@@ -658,6 +660,10 @@
658
660
  return this;
659
661
  };
660
662
 
663
+ p.endTime = function(includeRepeats) {
664
+ return this._startTime + ((includeRepeats != false) ? this.totalDuration() : this.duration()) / this._timeScale;
665
+ };
666
+
661
667
  p.timeScale = function(value) {
662
668
  if (!arguments.length) {
663
669
  return this._timeScale;
@@ -725,7 +731,7 @@
725
731
  p = SimpleTimeline.prototype = new Animation();
726
732
  p.constructor = SimpleTimeline;
727
733
  p.kill()._gc = false;
728
- p._first = p._last = null;
734
+ p._first = p._last = p._recent = null;
729
735
  p._sortChildren = false;
730
736
 
731
737
  p.add = p.insert = function(child, position, align, stagger) {
@@ -761,6 +767,7 @@
761
767
  this._last = child;
762
768
  }
763
769
  child._prev = prevTween;
770
+ this._recent = child;
764
771
  if (this._timeline) {
765
772
  this._uncache(true);
766
773
  }
@@ -784,6 +791,9 @@
784
791
  this._last = tween._prev;
785
792
  }
786
793
  tween._next = tween._prev = tween.timeline = null;
794
+ if (tween === this._recent) {
795
+ this._recent = this._last;
796
+ }
787
797
 
788
798
  if (this._timeline) {
789
799
  this._uncache(true);
@@ -876,7 +886,7 @@
876
886
  }
877
887
  }, true),
878
888
  _isSelector = function(v) {
879
- return (v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.
889
+ return (v && v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.
880
890
  },
881
891
  _autoCSS = function(vars, target) {
882
892
  var css = {},
@@ -900,7 +910,7 @@
900
910
  p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
901
911
  p._notifyPluginsOfEnabled = p._lazy = false;
902
912
 
903
- TweenLite.version = "1.13.2";
913
+ TweenLite.version = "1.14.0";
904
914
  TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
905
915
  TweenLite.defaultOverwrite = "auto";
906
916
  TweenLite.ticker = _ticker;
@@ -924,18 +934,19 @@
924
934
  _plugins = TweenLite._plugins = {},
925
935
  _tweenLookup = _internals.tweenLookup = {},
926
936
  _tweenLookupNum = 0,
927
- _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1},
937
+ _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1, onOverwrite:1},
928
938
  _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0},
929
939
  _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(),
930
940
  _rootTimeline = Animation._rootTimeline = new SimpleTimeline(),
931
941
  _lazyRender = _internals.lazyRender = function() {
932
- var i = _lazyTweens.length;
942
+ var i = _lazyTweens.length,
943
+ tween;
933
944
  _lazyLookup = {};
934
945
  while (--i > -1) {
935
- a = _lazyTweens[i];
936
- if (a && a._lazy !== false) {
937
- a.render(a._lazy[0], a._lazy[1], true);
938
- a._lazy = false;
946
+ tween = _lazyTweens[i];
947
+ if (tween && tween._lazy !== false) {
948
+ tween.render(tween._lazy[0], tween._lazy[1], true);
949
+ tween._lazy = false;
939
950
  }
940
951
  }
941
952
  _lazyTweens.length = 0;
@@ -1003,14 +1014,27 @@
1003
1014
  return _tweenLookup[id].tweens;
1004
1015
  },
1005
1016
 
1017
+ _onOverwrite = function(overwrittenTween, overwritingTween, target, killedProps) {
1018
+ var func = overwrittenTween.vars.onOverwrite;
1019
+ if (func) {
1020
+ func(overwrittenTween, overwritingTween, target, killedProps);
1021
+ }
1022
+ func = TweenLite.onOverwrite;
1023
+ if (func) {
1024
+ func(overwrittenTween, overwritingTween, target, killedProps);
1025
+ }
1026
+ },
1006
1027
  _applyOverwrite = function(target, tween, props, mode, siblings) {
1007
1028
  var i, changed, curTween, l;
1008
1029
  if (mode === 1 || mode >= 4) {
1009
1030
  l = siblings.length;
1010
1031
  for (i = 0; i < l; i++) {
1011
1032
  if ((curTween = siblings[i]) !== tween) {
1012
- if (!curTween._gc) if (curTween._enabled(false, false)) {
1013
- changed = true;
1033
+ if (!curTween._gc) {
1034
+ if (curTween._enabled(false, false)) {
1035
+ changed = true;
1036
+ }
1037
+ _onOverwrite(curTween, tween);
1014
1038
  }
1015
1039
  } else if (mode === 5) {
1016
1040
  break;
@@ -1041,13 +1065,16 @@
1041
1065
  i = oCount;
1042
1066
  while (--i > -1) {
1043
1067
  curTween = overlaps[i];
1044
- if (mode === 2) if (curTween._kill(props, target)) {
1068
+ if (mode === 2) if (curTween._kill(props, target, tween)) {
1045
1069
  changed = true;
1046
1070
  }
1047
1071
  if (mode !== 2 || (!curTween._firstPT && curTween._initted)) {
1048
1072
  if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween.
1049
1073
  changed = true;
1050
1074
  }
1075
+ if (mode !== 2) {
1076
+ _onOverwrite(curTween, tween);
1077
+ }
1051
1078
  }
1052
1079
  }
1053
1080
  return changed;
@@ -1363,7 +1390,7 @@
1363
1390
  }
1364
1391
 
1365
1392
  if (this._onUpdate) {
1366
- 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.
1393
+ 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.
1367
1394
  this._startAt.render(time, suppressEvents, 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.
1368
1395
  }
1369
1396
  if (!suppressEvents) if (this._time !== prevTime || isComplete) {
@@ -1372,7 +1399,7 @@
1372
1399
  }
1373
1400
 
1374
1401
  if (callback) if (!this._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate
1375
- 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.
1402
+ 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.
1376
1403
  this._startAt.render(time, suppressEvents, force);
1377
1404
  }
1378
1405
  if (isComplete) {
@@ -1390,7 +1417,7 @@
1390
1417
  }
1391
1418
  };
1392
1419
 
1393
- p._kill = function(vars, target) {
1420
+ p._kill = function(vars, target, overwritingTween) {
1394
1421
  if (vars === "all") {
1395
1422
  vars = null;
1396
1423
  }
@@ -1399,7 +1426,7 @@
1399
1426
  return this._enabled(false, false);
1400
1427
  }
1401
1428
  target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target;
1402
- var i, overwrittenProps, p, pt, propLookup, changed, killProps, record;
1429
+ var i, overwrittenProps, p, pt, propLookup, changed, killProps, record, killed;
1403
1430
  if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {
1404
1431
  i = target.length;
1405
1432
  while (--i > -1) {
@@ -1430,6 +1457,10 @@
1430
1457
  record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin)
1431
1458
  for (p in killProps) {
1432
1459
  if ((pt = propLookup[p])) {
1460
+ if (!killed) {
1461
+ killed = [];
1462
+ }
1463
+ killed.push(p);
1433
1464
  if (pt.pg && pt.t._kill(killProps)) {
1434
1465
  changed = true; //some plugins need to be notified so they can perform cleanup tasks first
1435
1466
  }
@@ -1453,6 +1484,9 @@
1453
1484
  if (!this._firstPT && this._initted) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.
1454
1485
  this._enabled(false, false);
1455
1486
  }
1487
+ if (killed && overwritingTween) {
1488
+ _onOverwrite(this, overwritingTween, target, killed);
1489
+ }
1456
1490
  }
1457
1491
  }
1458
1492
  return changed;
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.13.2
3
- * DATE: 2014-08-23
2
+ * VERSION: 1.14.0
3
+ * DATE: 2014-10-14
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
@@ -41,7 +41,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
41
41
  p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
42
42
  _blankArray = [];
43
43
 
44
- TweenMax.version = "1.13.2";
44
+ TweenMax.version = "1.14.0";
45
45
  p.constructor = TweenMax;
46
46
  p.kill()._gc = false;
47
47
  TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
@@ -343,14 +343,20 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
343
343
  targets = _slice(targets);
344
344
  }
345
345
  }
346
- l = targets.length;
347
- for (i = 0; i < l; i++) {
346
+ targets = targets || [];
347
+ if (stagger < 0) {
348
+ targets = _slice(targets);
349
+ targets.reverse();
350
+ stagger *= -1;
351
+ }
352
+ l = targets.length - 1;
353
+ for (i = 0; i <= l; i++) {
348
354
  copy = {};
349
355
  for (p in vars) {
350
356
  copy[p] = vars[p];
351
357
  }
352
358
  copy.delay = delay;
353
- if (i === l - 1 && onCompleteAll) {
359
+ if (i === l && onCompleteAll) {
354
360
  copy.onComplete = finalComplete;
355
361
  }
356
362
  a[i] = new TweenMax(targets[i], duration, copy);
@@ -651,7 +657,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
651
657
  },
652
658
  p = TimelineLite.prototype = new SimpleTimeline();
653
659
 
654
- TimelineLite.version = "1.13.2";
660
+ TimelineLite.version = "1.14.0";
655
661
  p.constructor = TimelineLite;
656
662
  p.kill()._gc = p._forcingPlayhead = false;
657
663
 
@@ -697,10 +703,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
697
703
  if (typeof(targets) === "string") {
698
704
  targets = TweenLite.selector(targets) || targets;
699
705
  }
706
+ targets = targets || [];
700
707
  if (_isSelector(targets)) { //senses if the targets object is a selector. If it is, we should translate it into an array.
701
708
  targets = _slice(targets);
702
709
  }
703
710
  stagger = stagger || 0;
711
+ if (stagger < 0) {
712
+ targets = _slice(targets);
713
+ targets.reverse();
714
+ stagger *= -1;
715
+ }
704
716
  for (i = 0; i < targets.length; i++) {
705
717
  if (vars.startAt) {
706
718
  vars.startAt = _copy(vars.startAt);
@@ -1097,6 +1109,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1097
1109
  return a;
1098
1110
  };
1099
1111
 
1112
+ p.recent = function() {
1113
+ return this._recent;
1114
+ };
1115
+
1100
1116
  p._contains = function(tween) {
1101
1117
  var tl = tween.timeline;
1102
1118
  while (tl) {
@@ -1292,7 +1308,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1292
1308
 
1293
1309
  p.constructor = TimelineMax;
1294
1310
  p.kill()._gc = false;
1295
- TimelineMax.version = "1.13.2";
1311
+ TimelineMax.version = "1.14.0";
1296
1312
 
1297
1313
  p.invalidate = function() {
1298
1314
  this._yoyo = (this.vars.yoyo === true);
@@ -2325,7 +2341,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2325
2341
  p = CSSPlugin.prototype = new TweenPlugin("css");
2326
2342
 
2327
2343
  p.constructor = CSSPlugin;
2328
- CSSPlugin.version = "1.13.2";
2344
+ CSSPlugin.version = "1.14.0";
2329
2345
  CSSPlugin.API = 2;
2330
2346
  CSSPlugin.defaultTransformPerspective = 0;
2331
2347
  CSSPlugin.defaultSkewType = "compensated";
@@ -2354,6 +2370,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2354
2370
  _RAD2DEG = 180 / Math.PI,
2355
2371
  _forcePT = {},
2356
2372
  _doc = document,
2373
+ _docElement = _doc.documentElement,
2357
2374
  _tempDiv = _doc.createElement("div"),
2358
2375
  _tempImg = _doc.createElement("img"),
2359
2376
  _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins
@@ -2372,11 +2389,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2372
2389
  _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || Number(_agent.substr(i+8, 1)) > 3));
2373
2390
  _isSafariLT6 = (_isSafari && (Number(_agent.substr(_agent.indexOf("Version/")+8, 1)) < 6));
2374
2391
  _isFirefox = (_agent.indexOf("Firefox") !== -1);
2375
-
2376
- if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {
2392
+ if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {
2377
2393
  _ieVers = parseFloat( RegExp.$1 );
2378
2394
  }
2379
-
2380
2395
  d.innerHTML = "<a style='top:1px;opacity:.55;'>a</a>";
2381
2396
  a = d.getElementsByTagName("a")[0];
2382
2397
  return a ? /^0.55/.test(a.style.opacity) : false;
@@ -2389,6 +2404,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2389
2404
  console.log(s);
2390
2405
  }
2391
2406
  },
2407
+
2392
2408
  _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-"
2393
2409
  _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz".
2394
2410
 
@@ -2627,7 +2643,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2627
2643
  * @return {number} Parsed value
2628
2644
  */
2629
2645
  _parseVal = function(v, d) {
2630
- return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) + d : parseFloat(v);
2646
+ return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v);
2631
2647
  },
2632
2648
 
2633
2649
  /**
@@ -3351,6 +3367,41 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3351
3367
  Transform = _internals.Transform = function() {
3352
3368
  this.skewY = 0;
3353
3369
  },
3370
+ _SVGElement = window.SVGElement,
3371
+ _forceSVGTransformToAttr = (_SVGElement && (_ieVers || (/Android/i.test(_agent) && !window.chrome))), //IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute.
3372
+ //Some browsers (like Firefox and IE) don't honor transform-origin properly in SVG elements, so we need to manually adjust the matrix accordingly. We feature detect here rather than always doing the conversion for certain browsers because they may fix the problem at some point in the future.
3373
+
3374
+ /* originally used to sense browsers that didn't handle SVG transform-origin properly, but due to all the fragmentation and odd behavior across browsers, we decided to just manage transform-origin internally for all browsers.
3375
+ _createSVG = function(type, container, attributes) {
3376
+ var element = _doc.createElementNS("http://www.w3.org/2000/svg", type),
3377
+ reg = /([a-z])([A-Z])/g,
3378
+ p;
3379
+ for (p in attributes) {
3380
+ element.setAttributeNS(null, p.replace(reg, "$1-$2").toLowerCase(), attributes[p]);
3381
+ }
3382
+ container.appendChild(element);
3383
+ return element;
3384
+ },
3385
+ _fixSVGOrigin = (function() {
3386
+ if (_doc.createElementNS) { //IE8 and earlier doesn't support SVG anyway
3387
+ var svg = _createSVG("svg", _docElement),
3388
+ rect = _createSVG("rect", svg, {width:100, height:50, x:100}),
3389
+ left, matches;
3390
+ left = rect.getBoundingClientRect().left;
3391
+ rect.style[_transformOriginProp] = "50% 50%";
3392
+ rect.style[_transformProp] = "scale(0.5,0.5)";
3393
+ matches = (left === rect.getBoundingClientRect().left);
3394
+ _docElement.removeChild(svg);
3395
+ return matches;
3396
+ }
3397
+ })(),
3398
+ */
3399
+ _parseSVGOrigin = function(e, origin, decoratee) {
3400
+ var bbox = e.getBBox();
3401
+ origin = _parsePosition(origin).split(" ");
3402
+ decoratee.xOrigin = (origin[0].indexOf("%") !== -1 ? parseFloat(origin[0]) / 100 * bbox.width : parseFloat(origin[0])) + bbox.x;
3403
+ decoratee.yOrigin = (origin[1].indexOf("%") !== -1 ? parseFloat(origin[1]) / 100 * bbox.height : parseFloat(origin[1])) + bbox.y;
3404
+ },
3354
3405
 
3355
3406
  /**
3356
3407
  * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10.
@@ -3381,7 +3432,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3381
3432
  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(",") : "";
3382
3433
  }
3383
3434
  if (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)") { //if no transforms are applied, just use the defaults to optimize performance (no need to parse).
3384
- tm = {x:0, y:0, z:0, scaleX:1, scaleY:1, scaleZ:1, skewX:0, perspective:defaultTransformPerspective, rotation:0, rotationX:0, rotationY:0, zOrigin:0};
3435
+ tm = {x:0, y:0, z:0, scaleX:1, scaleY:1, scaleZ:1, skewX:0, skewY:0, perspective:defaultTransformPerspective, rotation:0, rotationX:0, rotationY:0, zOrigin:0};
3385
3436
  } else {
3386
3437
  //split the matrix values out into an array (m for matrix)
3387
3438
  m = (s || "").match(/(?:\-|\b)[\d\-\.e]+\b/gi) || [];
@@ -3529,6 +3580,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3529
3580
  if (rec) {
3530
3581
  t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method)
3531
3582
  }
3583
+ tm.svg = (_SVGElement && (t instanceof _SVGElement));
3584
+ if (tm.svg) {
3585
+ _parseSVGOrigin(t, _getStyle(t, _transformOriginProp, _cs, false, "50% 50%") + "", tm);
3586
+ }
3532
3587
  tm.xPercent = tm.yPercent = 0;
3533
3588
  return tm;
3534
3589
  },
@@ -3660,7 +3715,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3660
3715
  a12 = -sin;
3661
3716
  a22 = cos;
3662
3717
 
3663
- } else if (!t.rotationY && !t.rotationX && sz === 1 && !perspective) { //if we're only translating and/or 2D scaling, this is faster...
3718
+ } else if (!t.rotationY && !t.rotationX && sz === 1 && !perspective && !t.svg) { //if we're only translating and/or 2D scaling, this is faster...
3664
3719
  style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) translate3d(" : "translate3d(") + x + "px," + y + "px," + z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : "");
3665
3720
  return;
3666
3721
  } else {
@@ -3730,6 +3785,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3730
3785
  a14 = (t1 = (a14 += x) - (a14 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a14 : a14;
3731
3786
  a24 = (t1 = (a24 += y) - (a24 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a24 : a24;
3732
3787
  a34 = (t1 = (a34 += z) - (a34 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a34 : a34;
3788
+ if (t.svg) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually
3789
+ a14 += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12);
3790
+ a24 += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22);
3791
+ }
3733
3792
  style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d(") + [ (((a11 * rnd) | 0) / rnd), (((a21 * rnd) | 0) / rnd), (((a31 * rnd) | 0) / rnd), (((a41 * rnd) | 0) / rnd), (((a12 * rnd) | 0) / rnd), (((a22 * rnd) | 0) / rnd), (((a32 * rnd) | 0) / rnd), (((a42 * rnd) | 0) / rnd), (((a13 * rnd) | 0) / rnd), (((a23 * rnd) | 0) / rnd), (((a33 * rnd) | 0) / rnd), (((a43 * rnd) | 0) / rnd), a14, a24, a34, (perspective ? (1 + (-a34 / perspective)) : 1) ].join(",") + ")";
3734
3793
  },
3735
3794
 
@@ -3739,24 +3798,35 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3739
3798
  style = targ.style,
3740
3799
  x = t.x,
3741
3800
  y = t.y,
3742
- prefix = "",
3743
- ang, skew, rnd, sx, sy;
3744
- if (t.rotationX || t.rotationY || t.z || t.force3D === true || (t.force3D === "auto" && v !== 1 && v !== 0)) { //if a 3D tween begins while a 2D one is running, we need to kick the rendering over to the 3D method. For example, imagine a yoyo-ing, infinitely repeating scale tween running, and then the object gets rotated in 3D space with a different tween.
3801
+ ang, skew, rnd, sx, sy, a, b, c, d, matrix;
3802
+ if ((t.rotationX || t.rotationY || t.z || t.force3D === true || (t.force3D === "auto" && v !== 1 && v !== 0)) && !(t.svg && _forceSVGTransformToAttr) && _supports3D) { //if a 3D tween begins while a 2D one is running, we need to kick the rendering over to the 3D method. For example, imagine a yoyo-ing, infinitely repeating scale tween running, and then the object gets rotated in 3D space with a different tween.
3745
3803
  this.setRatio = _set3DTransformRatio;
3746
3804
  _set3DTransformRatio.call(this, v);
3747
3805
  return;
3748
3806
  }
3749
-
3750
- if (!t.rotation && !t.skewX) {
3751
- style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + t.scaleX + ",0,0," + t.scaleY + "," + x + "," + y + ")";
3752
- } else {
3807
+ sx = t.scaleX;
3808
+ sy = t.scaleY;
3809
+ if (t.rotation || t.skewX || t.svg) {
3753
3810
  ang = t.rotation * _DEG2RAD;
3754
3811
  skew = ang - t.skewX * _DEG2RAD;
3755
3812
  rnd = 100000;
3756
- sx = t.scaleX * rnd;
3757
- sy = t.scaleY * rnd;
3758
- //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places.
3759
- style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + (((Math.cos(ang) * sx) | 0) / rnd) + "," + (((Math.sin(ang) * sx) | 0) / rnd) + "," + (((Math.sin(skew) * -sy) | 0) / rnd) + "," + (((Math.cos(skew) * sy) | 0) / rnd) + "," + x + "," + y + ")";
3813
+ a = Math.cos(ang) * sx;
3814
+ b = Math.sin(ang) * sx;
3815
+ c = Math.sin(skew) * -sy;
3816
+ d = Math.cos(skew) * sy;
3817
+ if (t.svg) {
3818
+ x += t.xOrigin - (t.xOrigin * a + t.yOrigin * c);
3819
+ y += t.yOrigin - (t.xOrigin * b + t.yOrigin * d);
3820
+ }
3821
+ matrix = (((a * rnd) | 0) / rnd) + "," + (((b * rnd) | 0) / rnd) + "," + (((c * rnd) | 0) / rnd) + "," + (((d * rnd) | 0) / rnd) + "," + x + "," + y + ")";
3822
+ if (t.svg && _forceSVGTransformToAttr) {
3823
+ targ.setAttribute("transform", "matrix(" + matrix);
3824
+ } else {
3825
+ //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places.
3826
+ style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + matrix;
3827
+ }
3828
+ } else {
3829
+ style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + sx + ",0,0," + sy + "," + x + "," + y + ")";
3760
3830
  }
3761
3831
  };
3762
3832
 
@@ -3820,7 +3890,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3820
3890
  m2.rotation += skewY;
3821
3891
  }
3822
3892
  }
3823
-
3824
3893
  if (_supports3D && v.force3D != null) {
3825
3894
  m1.force3D = v.force3D;
3826
3895
  hasChange = true;
@@ -3836,7 +3905,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3836
3905
  while (--i > -1) {
3837
3906
  p = _transformProps[i];
3838
3907
  orig = m2[p] - m1[p];
3839
- if (orig > min || orig < -min || _forcePT[p] != null) {
3908
+ if (orig > min || orig < -min || v[p] != null || _forcePT[p] != null) {
3840
3909
  hasChange = true;
3841
3910
  pt = new CSSPropTween(m1, p, m1[p], orig, pt);
3842
3911
  if (p in endRotations) {
@@ -3849,7 +3918,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3849
3918
  }
3850
3919
 
3851
3920
  orig = v.transformOrigin;
3852
- if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).
3921
+ if (orig && m1.svg) {
3922
+ _parseSVGOrigin(t, orig, m2);
3923
+ pt = new CSSPropTween(m1, "xOrigin", m1.xOrigin, m2.xOrigin - m1.xOrigin, pt, -1, "transformOrigin");
3924
+ pt.b = m1.xOrigin;
3925
+ pt.e = pt.xs0 = m2.xOrigin;
3926
+ pt = new CSSPropTween(m1, "yOrigin", m1.yOrigin, m2.yOrigin - m1.yOrigin, pt, -1, "transformOrigin");
3927
+ pt.b = m1.yOrigin;
3928
+ pt.e = pt.xs0 = m2.yOrigin;
3929
+ _removeProp(style, _transformOriginProp); //certain browsers (like firefox) completely botch transform-origin, so we must remove it to prevent it from contaminating transforms. We manage it ourselves with xOrigin and yOrigin
3930
+ } else if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).
3853
3931
  if (_transformProp) {
3854
3932
  hasChange = true;
3855
3933
  p = _transformOriginProp;
@@ -3874,9 +3952,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
3874
3952
  _parsePosition(orig + "", m1);
3875
3953
  }
3876
3954
  }
3877
-
3878
3955
  if (hasChange) {
3879
- cssp._transformType = (has3D || this._transformType === 3) ? 3 : 2; //quicker than calling cssp._enableTransforms();
3956
+ cssp._transformType = (!(m1.svg && _forceSVGTransformToAttr) && (has3D || this._transformType === 3)) ? 3 : 2; //quicker than calling cssp._enableTransforms();
3880
3957
  }
3881
3958
  return pt;
3882
3959
  }, prefix:true});
@@ -4005,7 +4082,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
4005
4082
  //opacity-related
4006
4083
  var _setIEOpacityRatio = function(v) {
4007
4084
  var t = this.t, //refers to the element's style property
4008
- filters = t.filter || _getStyle(this.data, "filter"),
4085
+ filters = t.filter || _getStyle(this.data, "filter") || "",
4009
4086
  val = (this.s + this.c * v) | 0,
4010
4087
  skip;
4011
4088
  if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters.
@@ -4140,7 +4217,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
4140
4217
  s.cssText = "";
4141
4218
  clearTransform = true;
4142
4219
  } else {
4143
- a = this.e.split(",");
4220
+ a = this.e.split(" ").join("").split(",");
4144
4221
  i = a.length;
4145
4222
  while (--i > -1) {
4146
4223
  p = a[i];
@@ -4392,7 +4469,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
4392
4469
  var pt = this._firstPT,
4393
4470
  min = 0.000001,
4394
4471
  val, str, i;
4395
-
4396
4472
  //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards).
4397
4473
  if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) {
4398
4474
  while (pt) {
@@ -4466,8 +4542,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
4466
4542
  * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster)
4467
4543
  */
4468
4544
  p._enableTransforms = function(threeD) {
4469
- this._transformType = (threeD || this._transformType === 3) ? 3 : 2;
4470
4545
  this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values.
4546
+ this._transformType = (!(this._transform.svg && _forceSVGTransformToAttr) && (threeD || this._transformType === 3)) ? 3 : 2;
4471
4547
  };
4472
4548
 
4473
4549
  var lazySet = function(v) {
@@ -5432,10 +5508,12 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
5432
5508
  t = this._eventTarget;
5433
5509
  while (--i > -1) {
5434
5510
  listener = list[i];
5435
- if (listener.up) {
5436
- listener.c.call(listener.s || t, {type:type, target:t});
5437
- } else {
5438
- listener.c.call(listener.s || t);
5511
+ if (listener) {
5512
+ if (listener.up) {
5513
+ listener.c.call(listener.s || t, {type:type, target:t});
5514
+ } else {
5515
+ listener.c.call(listener.s || t);
5516
+ }
5439
5517
  }
5440
5518
  }
5441
5519
  }
@@ -5837,6 +5915,10 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
5837
5915
  return this;
5838
5916
  };
5839
5917
 
5918
+ p.endTime = function(includeRepeats) {
5919
+ return this._startTime + ((includeRepeats != false) ? this.totalDuration() : this.duration()) / this._timeScale;
5920
+ };
5921
+
5840
5922
  p.timeScale = function(value) {
5841
5923
  if (!arguments.length) {
5842
5924
  return this._timeScale;
@@ -5904,7 +5986,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
5904
5986
  p = SimpleTimeline.prototype = new Animation();
5905
5987
  p.constructor = SimpleTimeline;
5906
5988
  p.kill()._gc = false;
5907
- p._first = p._last = null;
5989
+ p._first = p._last = p._recent = null;
5908
5990
  p._sortChildren = false;
5909
5991
 
5910
5992
  p.add = p.insert = function(child, position, align, stagger) {
@@ -5940,6 +6022,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
5940
6022
  this._last = child;
5941
6023
  }
5942
6024
  child._prev = prevTween;
6025
+ this._recent = child;
5943
6026
  if (this._timeline) {
5944
6027
  this._uncache(true);
5945
6028
  }
@@ -5963,6 +6046,9 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
5963
6046
  this._last = tween._prev;
5964
6047
  }
5965
6048
  tween._next = tween._prev = tween.timeline = null;
6049
+ if (tween === this._recent) {
6050
+ this._recent = this._last;
6051
+ }
5966
6052
 
5967
6053
  if (this._timeline) {
5968
6054
  this._uncache(true);
@@ -6055,7 +6141,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6055
6141
  }
6056
6142
  }, true),
6057
6143
  _isSelector = function(v) {
6058
- return (v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.
6144
+ return (v && v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.
6059
6145
  },
6060
6146
  _autoCSS = function(vars, target) {
6061
6147
  var css = {},
@@ -6079,7 +6165,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6079
6165
  p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
6080
6166
  p._notifyPluginsOfEnabled = p._lazy = false;
6081
6167
 
6082
- TweenLite.version = "1.13.2";
6168
+ TweenLite.version = "1.14.0";
6083
6169
  TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
6084
6170
  TweenLite.defaultOverwrite = "auto";
6085
6171
  TweenLite.ticker = _ticker;
@@ -6103,18 +6189,19 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6103
6189
  _plugins = TweenLite._plugins = {},
6104
6190
  _tweenLookup = _internals.tweenLookup = {},
6105
6191
  _tweenLookupNum = 0,
6106
- _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1},
6192
+ _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1, onOverwrite:1},
6107
6193
  _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0},
6108
6194
  _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(),
6109
6195
  _rootTimeline = Animation._rootTimeline = new SimpleTimeline(),
6110
6196
  _lazyRender = _internals.lazyRender = function() {
6111
- var i = _lazyTweens.length;
6197
+ var i = _lazyTweens.length,
6198
+ tween;
6112
6199
  _lazyLookup = {};
6113
6200
  while (--i > -1) {
6114
- a = _lazyTweens[i];
6115
- if (a && a._lazy !== false) {
6116
- a.render(a._lazy[0], a._lazy[1], true);
6117
- a._lazy = false;
6201
+ tween = _lazyTweens[i];
6202
+ if (tween && tween._lazy !== false) {
6203
+ tween.render(tween._lazy[0], tween._lazy[1], true);
6204
+ tween._lazy = false;
6118
6205
  }
6119
6206
  }
6120
6207
  _lazyTweens.length = 0;
@@ -6182,14 +6269,27 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6182
6269
  return _tweenLookup[id].tweens;
6183
6270
  },
6184
6271
 
6272
+ _onOverwrite = function(overwrittenTween, overwritingTween, target, killedProps) {
6273
+ var func = overwrittenTween.vars.onOverwrite;
6274
+ if (func) {
6275
+ func(overwrittenTween, overwritingTween, target, killedProps);
6276
+ }
6277
+ func = TweenLite.onOverwrite;
6278
+ if (func) {
6279
+ func(overwrittenTween, overwritingTween, target, killedProps);
6280
+ }
6281
+ },
6185
6282
  _applyOverwrite = function(target, tween, props, mode, siblings) {
6186
6283
  var i, changed, curTween, l;
6187
6284
  if (mode === 1 || mode >= 4) {
6188
6285
  l = siblings.length;
6189
6286
  for (i = 0; i < l; i++) {
6190
6287
  if ((curTween = siblings[i]) !== tween) {
6191
- if (!curTween._gc) if (curTween._enabled(false, false)) {
6192
- changed = true;
6288
+ if (!curTween._gc) {
6289
+ if (curTween._enabled(false, false)) {
6290
+ changed = true;
6291
+ }
6292
+ _onOverwrite(curTween, tween);
6193
6293
  }
6194
6294
  } else if (mode === 5) {
6195
6295
  break;
@@ -6220,13 +6320,16 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6220
6320
  i = oCount;
6221
6321
  while (--i > -1) {
6222
6322
  curTween = overlaps[i];
6223
- if (mode === 2) if (curTween._kill(props, target)) {
6323
+ if (mode === 2) if (curTween._kill(props, target, tween)) {
6224
6324
  changed = true;
6225
6325
  }
6226
6326
  if (mode !== 2 || (!curTween._firstPT && curTween._initted)) {
6227
6327
  if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween.
6228
6328
  changed = true;
6229
6329
  }
6330
+ if (mode !== 2) {
6331
+ _onOverwrite(curTween, tween);
6332
+ }
6230
6333
  }
6231
6334
  }
6232
6335
  return changed;
@@ -6542,7 +6645,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6542
6645
  }
6543
6646
 
6544
6647
  if (this._onUpdate) {
6545
- 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.
6648
+ 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.
6546
6649
  this._startAt.render(time, suppressEvents, 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.
6547
6650
  }
6548
6651
  if (!suppressEvents) if (this._time !== prevTime || isComplete) {
@@ -6551,7 +6654,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6551
6654
  }
6552
6655
 
6553
6656
  if (callback) if (!this._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate
6554
- 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.
6657
+ 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.
6555
6658
  this._startAt.render(time, suppressEvents, force);
6556
6659
  }
6557
6660
  if (isComplete) {
@@ -6569,7 +6672,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6569
6672
  }
6570
6673
  };
6571
6674
 
6572
- p._kill = function(vars, target) {
6675
+ p._kill = function(vars, target, overwritingTween) {
6573
6676
  if (vars === "all") {
6574
6677
  vars = null;
6575
6678
  }
@@ -6578,7 +6681,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6578
6681
  return this._enabled(false, false);
6579
6682
  }
6580
6683
  target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target;
6581
- var i, overwrittenProps, p, pt, propLookup, changed, killProps, record;
6684
+ var i, overwrittenProps, p, pt, propLookup, changed, killProps, record, killed;
6582
6685
  if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {
6583
6686
  i = target.length;
6584
6687
  while (--i > -1) {
@@ -6609,6 +6712,10 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6609
6712
  record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin)
6610
6713
  for (p in killProps) {
6611
6714
  if ((pt = propLookup[p])) {
6715
+ if (!killed) {
6716
+ killed = [];
6717
+ }
6718
+ killed.push(p);
6612
6719
  if (pt.pg && pt.t._kill(killProps)) {
6613
6720
  changed = true; //some plugins need to be notified so they can perform cleanup tasks first
6614
6721
  }
@@ -6632,6 +6739,9 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
6632
6739
  if (!this._firstPT && this._initted) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.
6633
6740
  this._enabled(false, false);
6634
6741
  }
6742
+ if (killed && overwritingTween) {
6743
+ _onOverwrite(this, overwritingTween, target, killed);
6744
+ }
6635
6745
  }
6636
6746
  }
6637
6747
  return changed;
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.13.2
3
- * DATE: 2014-08-23
2
+ * VERSION: 1.14.0
3
+ * DATE: 2014-10-14
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -30,7 +30,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
30
30
  p = CSSPlugin.prototype = new TweenPlugin("css");
31
31
 
32
32
  p.constructor = CSSPlugin;
33
- CSSPlugin.version = "1.13.2";
33
+ CSSPlugin.version = "1.14.0";
34
34
  CSSPlugin.API = 2;
35
35
  CSSPlugin.defaultTransformPerspective = 0;
36
36
  CSSPlugin.defaultSkewType = "compensated";
@@ -59,6 +59,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
59
59
  _RAD2DEG = 180 / Math.PI,
60
60
  _forcePT = {},
61
61
  _doc = document,
62
+ _docElement = _doc.documentElement,
62
63
  _tempDiv = _doc.createElement("div"),
63
64
  _tempImg = _doc.createElement("img"),
64
65
  _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins
@@ -77,11 +78,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
77
78
  _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || Number(_agent.substr(i+8, 1)) > 3));
78
79
  _isSafariLT6 = (_isSafari && (Number(_agent.substr(_agent.indexOf("Version/")+8, 1)) < 6));
79
80
  _isFirefox = (_agent.indexOf("Firefox") !== -1);
80
-
81
- if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {
81
+ if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {
82
82
  _ieVers = parseFloat( RegExp.$1 );
83
83
  }
84
-
85
84
  d.innerHTML = "<a style='top:1px;opacity:.55;'>a</a>";
86
85
  a = d.getElementsByTagName("a")[0];
87
86
  return a ? /^0.55/.test(a.style.opacity) : false;
@@ -94,6 +93,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
94
93
  console.log(s);
95
94
  }
96
95
  },
96
+
97
97
  _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-"
98
98
  _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz".
99
99
 
@@ -332,7 +332,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
332
332
  * @return {number} Parsed value
333
333
  */
334
334
  _parseVal = function(v, d) {
335
- return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) + d : parseFloat(v);
335
+ return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v);
336
336
  },
337
337
 
338
338
  /**
@@ -1056,6 +1056,41 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1056
1056
  Transform = _internals.Transform = function() {
1057
1057
  this.skewY = 0;
1058
1058
  },
1059
+ _SVGElement = window.SVGElement,
1060
+ _forceSVGTransformToAttr = (_SVGElement && (_ieVers || (/Android/i.test(_agent) && !window.chrome))), //IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute.
1061
+ //Some browsers (like Firefox and IE) don't honor transform-origin properly in SVG elements, so we need to manually adjust the matrix accordingly. We feature detect here rather than always doing the conversion for certain browsers because they may fix the problem at some point in the future.
1062
+
1063
+ /* originally used to sense browsers that didn't handle SVG transform-origin properly, but due to all the fragmentation and odd behavior across browsers, we decided to just manage transform-origin internally for all browsers.
1064
+ _createSVG = function(type, container, attributes) {
1065
+ var element = _doc.createElementNS("http://www.w3.org/2000/svg", type),
1066
+ reg = /([a-z])([A-Z])/g,
1067
+ p;
1068
+ for (p in attributes) {
1069
+ element.setAttributeNS(null, p.replace(reg, "$1-$2").toLowerCase(), attributes[p]);
1070
+ }
1071
+ container.appendChild(element);
1072
+ return element;
1073
+ },
1074
+ _fixSVGOrigin = (function() {
1075
+ if (_doc.createElementNS) { //IE8 and earlier doesn't support SVG anyway
1076
+ var svg = _createSVG("svg", _docElement),
1077
+ rect = _createSVG("rect", svg, {width:100, height:50, x:100}),
1078
+ left, matches;
1079
+ left = rect.getBoundingClientRect().left;
1080
+ rect.style[_transformOriginProp] = "50% 50%";
1081
+ rect.style[_transformProp] = "scale(0.5,0.5)";
1082
+ matches = (left === rect.getBoundingClientRect().left);
1083
+ _docElement.removeChild(svg);
1084
+ return matches;
1085
+ }
1086
+ })(),
1087
+ */
1088
+ _parseSVGOrigin = function(e, origin, decoratee) {
1089
+ var bbox = e.getBBox();
1090
+ origin = _parsePosition(origin).split(" ");
1091
+ decoratee.xOrigin = (origin[0].indexOf("%") !== -1 ? parseFloat(origin[0]) / 100 * bbox.width : parseFloat(origin[0])) + bbox.x;
1092
+ decoratee.yOrigin = (origin[1].indexOf("%") !== -1 ? parseFloat(origin[1]) / 100 * bbox.height : parseFloat(origin[1])) + bbox.y;
1093
+ },
1059
1094
 
1060
1095
  /**
1061
1096
  * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10.
@@ -1086,7 +1121,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1086
1121
  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(",") : "";
1087
1122
  }
1088
1123
  if (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)") { //if no transforms are applied, just use the defaults to optimize performance (no need to parse).
1089
- tm = {x:0, y:0, z:0, scaleX:1, scaleY:1, scaleZ:1, skewX:0, perspective:defaultTransformPerspective, rotation:0, rotationX:0, rotationY:0, zOrigin:0};
1124
+ tm = {x:0, y:0, z:0, scaleX:1, scaleY:1, scaleZ:1, skewX:0, skewY:0, perspective:defaultTransformPerspective, rotation:0, rotationX:0, rotationY:0, zOrigin:0};
1090
1125
  } else {
1091
1126
  //split the matrix values out into an array (m for matrix)
1092
1127
  m = (s || "").match(/(?:\-|\b)[\d\-\.e]+\b/gi) || [];
@@ -1234,6 +1269,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1234
1269
  if (rec) {
1235
1270
  t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method)
1236
1271
  }
1272
+ tm.svg = (_SVGElement && (t instanceof _SVGElement));
1273
+ if (tm.svg) {
1274
+ _parseSVGOrigin(t, _getStyle(t, _transformOriginProp, _cs, false, "50% 50%") + "", tm);
1275
+ }
1237
1276
  tm.xPercent = tm.yPercent = 0;
1238
1277
  return tm;
1239
1278
  },
@@ -1365,7 +1404,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1365
1404
  a12 = -sin;
1366
1405
  a22 = cos;
1367
1406
 
1368
- } else if (!t.rotationY && !t.rotationX && sz === 1 && !perspective) { //if we're only translating and/or 2D scaling, this is faster...
1407
+ } else if (!t.rotationY && !t.rotationX && sz === 1 && !perspective && !t.svg) { //if we're only translating and/or 2D scaling, this is faster...
1369
1408
  style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) translate3d(" : "translate3d(") + x + "px," + y + "px," + z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : "");
1370
1409
  return;
1371
1410
  } else {
@@ -1435,6 +1474,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1435
1474
  a14 = (t1 = (a14 += x) - (a14 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a14 : a14;
1436
1475
  a24 = (t1 = (a24 += y) - (a24 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a24 : a24;
1437
1476
  a34 = (t1 = (a34 += z) - (a34 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a34 : a34;
1477
+ if (t.svg) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually
1478
+ a14 += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12);
1479
+ a24 += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22);
1480
+ }
1438
1481
  style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d(") + [ (((a11 * rnd) | 0) / rnd), (((a21 * rnd) | 0) / rnd), (((a31 * rnd) | 0) / rnd), (((a41 * rnd) | 0) / rnd), (((a12 * rnd) | 0) / rnd), (((a22 * rnd) | 0) / rnd), (((a32 * rnd) | 0) / rnd), (((a42 * rnd) | 0) / rnd), (((a13 * rnd) | 0) / rnd), (((a23 * rnd) | 0) / rnd), (((a33 * rnd) | 0) / rnd), (((a43 * rnd) | 0) / rnd), a14, a24, a34, (perspective ? (1 + (-a34 / perspective)) : 1) ].join(",") + ")";
1439
1482
  },
1440
1483
 
@@ -1444,24 +1487,35 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1444
1487
  style = targ.style,
1445
1488
  x = t.x,
1446
1489
  y = t.y,
1447
- prefix = "",
1448
- ang, skew, rnd, sx, sy;
1449
- if (t.rotationX || t.rotationY || t.z || t.force3D === true || (t.force3D === "auto" && v !== 1 && v !== 0)) { //if a 3D tween begins while a 2D one is running, we need to kick the rendering over to the 3D method. For example, imagine a yoyo-ing, infinitely repeating scale tween running, and then the object gets rotated in 3D space with a different tween.
1490
+ ang, skew, rnd, sx, sy, a, b, c, d, matrix;
1491
+ if ((t.rotationX || t.rotationY || t.z || t.force3D === true || (t.force3D === "auto" && v !== 1 && v !== 0)) && !(t.svg && _forceSVGTransformToAttr) && _supports3D) { //if a 3D tween begins while a 2D one is running, we need to kick the rendering over to the 3D method. For example, imagine a yoyo-ing, infinitely repeating scale tween running, and then the object gets rotated in 3D space with a different tween.
1450
1492
  this.setRatio = _set3DTransformRatio;
1451
1493
  _set3DTransformRatio.call(this, v);
1452
1494
  return;
1453
1495
  }
1454
-
1455
- if (!t.rotation && !t.skewX) {
1456
- style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + t.scaleX + ",0,0," + t.scaleY + "," + x + "," + y + ")";
1457
- } else {
1496
+ sx = t.scaleX;
1497
+ sy = t.scaleY;
1498
+ if (t.rotation || t.skewX || t.svg) {
1458
1499
  ang = t.rotation * _DEG2RAD;
1459
1500
  skew = ang - t.skewX * _DEG2RAD;
1460
1501
  rnd = 100000;
1461
- sx = t.scaleX * rnd;
1462
- sy = t.scaleY * rnd;
1463
- //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places.
1464
- style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + (((Math.cos(ang) * sx) | 0) / rnd) + "," + (((Math.sin(ang) * sx) | 0) / rnd) + "," + (((Math.sin(skew) * -sy) | 0) / rnd) + "," + (((Math.cos(skew) * sy) | 0) / rnd) + "," + x + "," + y + ")";
1502
+ a = Math.cos(ang) * sx;
1503
+ b = Math.sin(ang) * sx;
1504
+ c = Math.sin(skew) * -sy;
1505
+ d = Math.cos(skew) * sy;
1506
+ if (t.svg) {
1507
+ x += t.xOrigin - (t.xOrigin * a + t.yOrigin * c);
1508
+ y += t.yOrigin - (t.xOrigin * b + t.yOrigin * d);
1509
+ }
1510
+ matrix = (((a * rnd) | 0) / rnd) + "," + (((b * rnd) | 0) / rnd) + "," + (((c * rnd) | 0) / rnd) + "," + (((d * rnd) | 0) / rnd) + "," + x + "," + y + ")";
1511
+ if (t.svg && _forceSVGTransformToAttr) {
1512
+ targ.setAttribute("transform", "matrix(" + matrix);
1513
+ } else {
1514
+ //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places.
1515
+ style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + matrix;
1516
+ }
1517
+ } else {
1518
+ style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + sx + ",0,0," + sy + "," + x + "," + y + ")";
1465
1519
  }
1466
1520
  };
1467
1521
 
@@ -1525,7 +1579,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1525
1579
  m2.rotation += skewY;
1526
1580
  }
1527
1581
  }
1528
-
1529
1582
  if (_supports3D && v.force3D != null) {
1530
1583
  m1.force3D = v.force3D;
1531
1584
  hasChange = true;
@@ -1541,7 +1594,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1541
1594
  while (--i > -1) {
1542
1595
  p = _transformProps[i];
1543
1596
  orig = m2[p] - m1[p];
1544
- if (orig > min || orig < -min || _forcePT[p] != null) {
1597
+ if (orig > min || orig < -min || v[p] != null || _forcePT[p] != null) {
1545
1598
  hasChange = true;
1546
1599
  pt = new CSSPropTween(m1, p, m1[p], orig, pt);
1547
1600
  if (p in endRotations) {
@@ -1554,7 +1607,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1554
1607
  }
1555
1608
 
1556
1609
  orig = v.transformOrigin;
1557
- if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).
1610
+ if (orig && m1.svg) {
1611
+ _parseSVGOrigin(t, orig, m2);
1612
+ pt = new CSSPropTween(m1, "xOrigin", m1.xOrigin, m2.xOrigin - m1.xOrigin, pt, -1, "transformOrigin");
1613
+ pt.b = m1.xOrigin;
1614
+ pt.e = pt.xs0 = m2.xOrigin;
1615
+ pt = new CSSPropTween(m1, "yOrigin", m1.yOrigin, m2.yOrigin - m1.yOrigin, pt, -1, "transformOrigin");
1616
+ pt.b = m1.yOrigin;
1617
+ pt.e = pt.xs0 = m2.yOrigin;
1618
+ _removeProp(style, _transformOriginProp); //certain browsers (like firefox) completely botch transform-origin, so we must remove it to prevent it from contaminating transforms. We manage it ourselves with xOrigin and yOrigin
1619
+ } else if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).
1558
1620
  if (_transformProp) {
1559
1621
  hasChange = true;
1560
1622
  p = _transformOriginProp;
@@ -1579,9 +1641,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1579
1641
  _parsePosition(orig + "", m1);
1580
1642
  }
1581
1643
  }
1582
-
1583
1644
  if (hasChange) {
1584
- cssp._transformType = (has3D || this._transformType === 3) ? 3 : 2; //quicker than calling cssp._enableTransforms();
1645
+ cssp._transformType = (!(m1.svg && _forceSVGTransformToAttr) && (has3D || this._transformType === 3)) ? 3 : 2; //quicker than calling cssp._enableTransforms();
1585
1646
  }
1586
1647
  return pt;
1587
1648
  }, prefix:true});
@@ -1710,7 +1771,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1710
1771
  //opacity-related
1711
1772
  var _setIEOpacityRatio = function(v) {
1712
1773
  var t = this.t, //refers to the element's style property
1713
- filters = t.filter || _getStyle(this.data, "filter"),
1774
+ filters = t.filter || _getStyle(this.data, "filter") || "",
1714
1775
  val = (this.s + this.c * v) | 0,
1715
1776
  skip;
1716
1777
  if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters.
@@ -1845,7 +1906,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1845
1906
  s.cssText = "";
1846
1907
  clearTransform = true;
1847
1908
  } else {
1848
- a = this.e.split(",");
1909
+ a = this.e.split(" ").join("").split(",");
1849
1910
  i = a.length;
1850
1911
  while (--i > -1) {
1851
1912
  p = a[i];
@@ -2097,7 +2158,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2097
2158
  var pt = this._firstPT,
2098
2159
  min = 0.000001,
2099
2160
  val, str, i;
2100
-
2101
2161
  //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards).
2102
2162
  if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) {
2103
2163
  while (pt) {
@@ -2171,8 +2231,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2171
2231
  * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster)
2172
2232
  */
2173
2233
  p._enableTransforms = function(threeD) {
2174
- this._transformType = (threeD || this._transformType === 3) ? 3 : 2;
2175
2234
  this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values.
2235
+ this._transformType = (!(this._transform.svg && _forceSVGTransformToAttr) && (threeD || this._transformType === 3)) ? 3 : 2;
2176
2236
  };
2177
2237
 
2178
2238
  var lazySet = function(v) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 0.10.6
3
- * DATE: 2014-08-23
2
+ * VERSION: 0.10.7
3
+ * DATE: 2014-10-14
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * Requires TweenLite and CSSPlugin version 1.11.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://www.greensock.com/club/).
@@ -40,7 +40,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
40
40
  _isMultiTouching,
41
41
  _lastDragTime = 0,
42
42
  _slice = function(a) { //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()
43
- if (!a || a.nodeType || !a.push) { //if it's not an array, wrap it in one.
43
+ if (typeof(a) === "string") {
44
+ a = TweenLite.selector(a);
45
+ }
46
+ if (!a || a.nodeType) { //if it's not an array, wrap it in one.
44
47
  return [a];
45
48
  }
46
49
  var b = [],
@@ -138,6 +141,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
138
141
 
139
142
  _setStyle = function(e, p, value) {
140
143
  var s = e.style;
144
+ if (!s) {
145
+ return;
146
+ }
141
147
  if (s[p] === undefined) {
142
148
  p = _checkPrefix(e, p);
143
149
  }
@@ -325,12 +331,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
325
331
  offsets = (e.offsetLeft === undefined && e.nodeName.toLowerCase() === "svg") ? _getSVGOffsets(e) : e;
326
332
  offsetParent = offsets.offsetParent;
327
333
  isRoot = (parent === _docElement || parent === _doc.body);
328
- m[4] = Number(m[4]) + offsetOrigin.x + (offsets.offsetLeft || 0) - parentOffsetOrigin.x - (isRoot ? 0 : parent.scrollLeft) + (offsetParent ? parseInt(_getStyle(offsetParent, "borderLeftWidth"), 10) || 0 : 0);
329
- m[5] = Number(m[5]) + offsetOrigin.y + (offsets.offsetTop || 0) - parentOffsetOrigin.y - (isRoot ? 0 : parent.scrollTop) + (offsetParent ? parseInt(_getStyle(offsetParent, "borderTopWidth"), 10) || 0 : 0);
330
- if (!offsetParent && _getStyle(e, "position", cs) === "fixed") { //fixed position elements should factor in the scroll position of the document.
331
- m[4] += _getDocScrollLeft();
332
- m[5] += _getDocScrollTop();
333
- }
334
334
 
335
335
  //some browsers (like Chrome 31) have a bug that causes the offsetParent not to report correctly when a transform is applied to an element's parent, so the offsetTop and offsetLeft are measured from the parent instead of whatever the offsetParent reports as. For example, put an absolutely-positioned child div inside a position:static parent, then check the child's offsetTop before and after you apply a transform, like rotate(1deg). You'll see that it changes, but the offsetParent doesn't. So we must sense this condition here (and we can only do it after the body has loaded, as browsers don't accurately report offsets otherwise) and set a variable that we can easily reference later.
336
336
  if (_hasReparentBug === undefined && _doc.body && _transformProp) {
@@ -348,14 +348,23 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
348
348
  return value;
349
349
  }());
350
350
  }
351
+ m[4] = Number(m[4]) + offsetOrigin.x + (offsets.offsetLeft || 0) - parentOffsetOrigin.x - (isRoot ? 0 : parent.scrollLeft) + (offsetParent ? parseInt(_getStyle(offsetParent, "borderLeftWidth"), 10) || 0 : 0);
352
+ m[5] = Number(m[5]) + offsetOrigin.y + (offsets.offsetTop || 0) - parentOffsetOrigin.y - (isRoot ? 0 : parent.scrollTop) + (offsetParent ? parseInt(_getStyle(offsetParent, "borderTopWidth"), 10) || 0 : 0);
351
353
  if (parent && parent.offsetParent === offsetParent && (!_hasReparentBug || _getOffset2DMatrix(parent).join("") === "100100")) {
352
354
  m[4] -= parent.offsetLeft || 0;
353
355
  m[5] -= parent.offsetTop || 0;
354
356
  }
357
+ if (parent && _getStyle(e, "position", true) === "fixed") { //fixed position elements should factor in the scroll position of the document.
358
+ m[4] += _getDocScrollLeft();
359
+ m[5] += _getDocScrollTop();
360
+ }
355
361
  }
356
362
  return m;
357
363
  },
358
364
  _getConcatenatedMatrix = function(e, invert) {
365
+ if (!e || e === window || !e.parentNode) {
366
+ return [1,0,0,1,0,0];
367
+ }
359
368
  //note: we keep reusing _point1 and _point2 in order to minimize memory usage and garbage collection chores.
360
369
  var originOffset = _getOffsetTransformOrigin(e, _point1),
361
370
  parentOriginOffset = _getOffsetTransformOrigin(e.parentNode, _point2),
@@ -1144,7 +1153,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1144
1153
  TweenLite.killTweensOf(target, true, {scrollTo:1}); //just in case the original target's scroll position is being tweened somewhere else.
1145
1154
  }
1146
1155
  self.tween = lockedAxis = null;
1147
- if (!rotationMode && !scrollProxy && vars.zIndexBoost !== false) {
1156
+ if (vars.zIndexBoost || (!rotationMode && !scrollProxy && vars.zIndexBoost !== false)) {
1148
1157
  target.style.zIndex = Draggable.zIndex++;
1149
1158
  }
1150
1159
  self.isPressed = true;
@@ -1570,7 +1579,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1570
1579
  p.constructor = Draggable;
1571
1580
  p.pointerX = p.pointerY = 0;
1572
1581
  p.isDragging = p.isPressed = false;
1573
- Draggable.version = "0.10.6";
1582
+ Draggable.version = "0.10.7";
1574
1583
  Draggable.zIndex = 1000;
1575
1584
 
1576
1585
  _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.13.2.0
4
+ version: 1.14.0.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: 2014-08-28 00:00:00.000000000 Z
11
+ date: 2014-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler