greensock-rails 1.12.1.0 → 1.13.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/lib/greensock/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/greensock/TimelineLite.js +64 -13
  4. data/vendor/assets/javascripts/greensock/TimelineMax.js +76 -16
  5. data/vendor/assets/javascripts/greensock/TweenLite.js +34 -25
  6. data/vendor/assets/javascripts/greensock/TweenMax.js +288 -202
  7. data/vendor/assets/javascripts/greensock/easing/EasePack.js +7 -6
  8. data/vendor/assets/javascripts/greensock/jquery.gsap.js +4 -4
  9. data/vendor/assets/javascripts/greensock/plugins/AttrPlugin.js +7 -6
  10. data/vendor/assets/javascripts/greensock/plugins/BezierPlugin.js +22 -7
  11. data/vendor/assets/javascripts/greensock/plugins/CSSPlugin.js +186 -148
  12. data/vendor/assets/javascripts/greensock/plugins/CSSRulePlugin.js +7 -6
  13. data/vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js +7 -6
  14. data/vendor/assets/javascripts/greensock/plugins/DirectionalRotationPlugin.js +7 -6
  15. data/vendor/assets/javascripts/greensock/plugins/EaselPlugin.js +7 -6
  16. data/vendor/assets/javascripts/greensock/plugins/EndArrayPlugin.js +7 -6
  17. data/vendor/assets/javascripts/greensock/plugins/KineticPlugin.js +8 -7
  18. data/vendor/assets/javascripts/greensock/plugins/RaphaelPlugin.js +7 -6
  19. data/vendor/assets/javascripts/greensock/plugins/RoundPropsPlugin.js +7 -5
  20. data/vendor/assets/javascripts/greensock/plugins/ScrollToPlugin.js +11 -6
  21. data/vendor/assets/javascripts/greensock/plugins/TEMPLATE_Plugin.js +6 -5
  22. data/vendor/assets/javascripts/greensock/plugins/TextPlugin.js +7 -6
  23. data/vendor/assets/javascripts/greensock/utils/Draggable.js +27 -7
  24. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8561239002881c4b075c6bd8cf1942f0f0d6826
4
- data.tar.gz: 4d954c37c59064fdbf7d99256801a87c03a20795
3
+ metadata.gz: 649f926f3d242b1ed584c267c2fb1ec9bab13c89
4
+ data.tar.gz: ecf9549b8688cee74f079d2e016e7bc6dd3a8acf
5
5
  SHA512:
6
- metadata.gz: fdc354762b937c83d75419144e20f578a6c9e3439261ea963a3259ec344e3d8ff5543facad69caaa35acc93d8c569469ecad038bc4244c7404969634ac49ca47
7
- data.tar.gz: ad659bfb36a6d74c162f44de453e54711b71ccd447eefdc38162859654e8976100b6e7a6e644e5b2be9fd31f301702accddfe6cae5da8a7232126174e27080e6
6
+ metadata.gz: 7a25c7565e4cc885412c5968915ef374ff01c343e6085e480386fbed502d5bbb51d1973397e5ec1d36b43de6cf26f6d8012cebaefcdbca9e2761982e77abb812
7
+ data.tar.gz: d1adca2112c0a3c9aa936db2a461279edcf8cf43e5931c813931fb48ed725bb161f26643a69b02035a355af13824a235f2ea1074624131a14b3c3c0f8352c658
@@ -1,5 +1,5 @@
1
1
  module Greensock
2
2
  module Rails
3
- VERSION = "1.12.1.0"
3
+ VERSION = "1.13.1.0"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.12.1
3
- * DATE: 2014-06-26
2
+ * VERSION: 1.13.1
3
+ * DATE: 2014-07-22
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,12 +9,12 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  */
12
-
13
- (window._gsQueue || (window._gsQueue = [])).push( function() {
12
+ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13
+ (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14
14
 
15
15
  "use strict";
16
16
 
17
- window._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {
17
+ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {
18
18
 
19
19
  var TimelineLite = function(vars) {
20
20
  SimpleTimeline.call(this, vars);
@@ -36,10 +36,13 @@
36
36
  }
37
37
  },
38
38
  _tinyNum = 0.0000000001,
39
- _isSelector = TweenLite._internals.isSelector,
40
- _isArray = TweenLite._internals.isArray,
39
+ TweenLiteInternals = TweenLite._internals,
40
+ _isSelector = TweenLiteInternals.isSelector,
41
+ _isArray = TweenLiteInternals.isArray,
42
+ _lazyTweens = TweenLiteInternals.lazyTweens,
43
+ _lazyRender = TweenLiteInternals.lazyRender,
41
44
  _blankArray = [],
42
- _globals = window._gsDefine.globals,
45
+ _globals = _gsScope._gsDefine.globals,
43
46
  _copy = function(vars) {
44
47
  var copy = {}, p;
45
48
  for (p in vars) {
@@ -53,12 +56,40 @@
53
56
  callback.apply(scope || tween._timeline, params || _blankArray);
54
57
  }
55
58
  },
56
- _slice = _blankArray.slice,
59
+ _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()
60
+ var b = [],
61
+ l = a.length,
62
+ i;
63
+ for (i = 0; i !== l; b.push(a[i++]));
64
+ return b;
65
+ },
57
66
  p = TimelineLite.prototype = new SimpleTimeline();
58
67
 
59
- TimelineLite.version = "1.12.1";
68
+ TimelineLite.version = "1.13.1";
60
69
  p.constructor = TimelineLite;
61
70
  p.kill()._gc = false;
71
+
72
+ /* might use later...
73
+ //translates a local time inside an animation to the corresponding time on the root/global timeline, factoring in all nesting and timeScales.
74
+ function localToGlobal(time, animation) {
75
+ while (animation) {
76
+ time = (time / animation._timeScale) + animation._startTime;
77
+ animation = animation.timeline;
78
+ }
79
+ return time;
80
+ }
81
+
82
+ //translates the supplied time on the root/global timeline into the corresponding local time inside a particular animation, factoring in all nesting and timeScales
83
+ function globalToLocal(time, animation) {
84
+ var scale = 1;
85
+ time -= localToGlobal(0, animation);
86
+ while (animation) {
87
+ scale *= animation._timeScale;
88
+ animation = animation.timeline;
89
+ }
90
+ return time * scale;
91
+ }
92
+ */
62
93
 
63
94
  p.to = function(target, duration, vars, position) {
64
95
  var Engine = (vars.repeat && _globals.TweenMax) || TweenLite;
@@ -81,7 +112,7 @@
81
112
  targets = TweenLite.selector(targets) || targets;
82
113
  }
83
114
  if (_isSelector(targets)) { //senses if the targets object is a selector. If it is, we should translate it into an array.
84
- targets = _slice.call(targets, 0);
115
+ targets = _slice(targets);
85
116
  }
86
117
  stagger = stagger || 0;
87
118
  for (i = 0; i < targets.length; i++) {
@@ -337,7 +368,7 @@
337
368
  }
338
369
  if (time < 0) {
339
370
  this._active = false;
340
- if (this._duration === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
371
+ if (this._rawPrevTime >= 0 && this._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state.
341
372
  internalForce = true;
342
373
  }
343
374
  this._rawPrevTime = time;
@@ -400,11 +431,17 @@
400
431
  }
401
432
 
402
433
  if (this._onUpdate) if (!suppressEvents) {
434
+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.
435
+ _lazyRender();
436
+ }
403
437
  this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);
404
438
  }
405
439
 
406
440
  if (callback) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate
407
441
  if (isComplete) {
442
+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values.
443
+ _lazyRender();
444
+ }
408
445
  if (this._timeline.autoRemoveChildren) {
409
446
  this._enabled(false, false);
410
447
  }
@@ -626,4 +663,18 @@
626
663
  }, true);
627
664
 
628
665
 
629
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
666
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
667
+
668
+ //export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date)
669
+ (function(name) {
670
+ "use strict";
671
+ var getGlobal = function() {
672
+ return (_gsScope.GreenSockGlobals || _gsScope)[name];
673
+ };
674
+ if (typeof(define) === "function" && define.amd) { //AMD
675
+ define(["TweenLite"], getGlobal);
676
+ } else if (typeof(module) !== "undefined" && module.exports) { //node
677
+ require("./TweenLite.js"); //dependency
678
+ module.exports = getGlobal();
679
+ }
680
+ }("TimelineLite"));
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.12.1
3
- * DATE: 2014-06-26
2
+ * VERSION: 1.13.1
3
+ * DATE: 2014-07-22
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,12 +9,12 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  */
12
-
13
- (window._gsQueue || (window._gsQueue = [])).push( function() {
12
+ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13
+ (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14
14
 
15
15
  "use strict";
16
16
 
17
- window._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function(TimelineLite, TweenLite, Ease) {
17
+ _gsScope._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function(TimelineLite, TweenLite, Ease) {
18
18
 
19
19
  var TimelineMax = function(vars) {
20
20
  TimelineLite.call(this, vars);
@@ -26,12 +26,15 @@
26
26
  },
27
27
  _tinyNum = 0.0000000001,
28
28
  _blankArray = [],
29
+ TweenLiteInternals = TweenLite._internals,
30
+ _lazyTweens = TweenLiteInternals.lazyTweens,
31
+ _lazyRender = TweenLiteInternals.lazyRender,
29
32
  _easeNone = new Ease(null, null, 1, 0),
30
33
  p = TimelineMax.prototype = new TimelineLite();
31
34
 
32
35
  p.constructor = TimelineMax;
33
36
  p.kill()._gc = false;
34
- TimelineMax.version = "1.12.1";
37
+ TimelineMax.version = "1.13.1";
35
38
 
36
39
  p.invalidate = function() {
37
40
  this._yoyo = (this.vars.yoyo === true);
@@ -142,7 +145,7 @@
142
145
  }
143
146
  if (time < 0) {
144
147
  this._active = false;
145
- if (dur === 0) if (prevRawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
148
+ if (prevRawPrevTime >= 0 && this._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state.
146
149
  internalForce = true;
147
150
  }
148
151
  this._rawPrevTime = time;
@@ -282,10 +285,16 @@
282
285
  }
283
286
 
284
287
  if (this._onUpdate) if (!suppressEvents) {
288
+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.
289
+ _lazyRender();
290
+ }
285
291
  this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);
286
292
  }
287
293
  if (callback) if (!this._locked) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate
288
294
  if (isComplete) {
295
+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values.
296
+ _lazyRender();
297
+ }
289
298
  if (this._timeline.autoRemoveChildren) {
290
299
  this._enabled(false, false);
291
300
  }
@@ -452,7 +461,7 @@
452
461
  * ----------------------------------------------------------------
453
462
  */
454
463
 
455
- window._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {
464
+ _gsScope._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {
456
465
 
457
466
  var TimelineLite = function(vars) {
458
467
  SimpleTimeline.call(this, vars);
@@ -474,10 +483,13 @@
474
483
  }
475
484
  },
476
485
  _tinyNum = 0.0000000001,
477
- _isSelector = TweenLite._internals.isSelector,
478
- _isArray = TweenLite._internals.isArray,
486
+ TweenLiteInternals = TweenLite._internals,
487
+ _isSelector = TweenLiteInternals.isSelector,
488
+ _isArray = TweenLiteInternals.isArray,
489
+ _lazyTweens = TweenLiteInternals.lazyTweens,
490
+ _lazyRender = TweenLiteInternals.lazyRender,
479
491
  _blankArray = [],
480
- _globals = window._gsDefine.globals,
492
+ _globals = _gsScope._gsDefine.globals,
481
493
  _copy = function(vars) {
482
494
  var copy = {}, p;
483
495
  for (p in vars) {
@@ -491,13 +503,41 @@
491
503
  callback.apply(scope || tween._timeline, params || _blankArray);
492
504
  }
493
505
  },
494
- _slice = _blankArray.slice,
506
+ _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()
507
+ var b = [],
508
+ l = a.length,
509
+ i;
510
+ for (i = 0; i !== l; b.push(a[i++]));
511
+ return b;
512
+ },
495
513
  p = TimelineLite.prototype = new SimpleTimeline();
496
514
 
497
- TimelineLite.version = "1.12.1";
515
+ TimelineLite.version = "1.13.1";
498
516
  p.constructor = TimelineLite;
499
517
  p.kill()._gc = false;
500
518
 
519
+ /* might use later...
520
+ //translates a local time inside an animation to the corresponding time on the root/global timeline, factoring in all nesting and timeScales.
521
+ function localToGlobal(time, animation) {
522
+ while (animation) {
523
+ time = (time / animation._timeScale) + animation._startTime;
524
+ animation = animation.timeline;
525
+ }
526
+ return time;
527
+ }
528
+
529
+ //translates the supplied time on the root/global timeline into the corresponding local time inside a particular animation, factoring in all nesting and timeScales
530
+ function globalToLocal(time, animation) {
531
+ var scale = 1;
532
+ time -= localToGlobal(0, animation);
533
+ while (animation) {
534
+ scale *= animation._timeScale;
535
+ animation = animation.timeline;
536
+ }
537
+ return time * scale;
538
+ }
539
+ */
540
+
501
541
  p.to = function(target, duration, vars, position) {
502
542
  var Engine = (vars.repeat && _globals.TweenMax) || TweenLite;
503
543
  return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position);
@@ -519,7 +559,7 @@
519
559
  targets = TweenLite.selector(targets) || targets;
520
560
  }
521
561
  if (_isSelector(targets)) { //senses if the targets object is a selector. If it is, we should translate it into an array.
522
- targets = _slice.call(targets, 0);
562
+ targets = _slice(targets);
523
563
  }
524
564
  stagger = stagger || 0;
525
565
  for (i = 0; i < targets.length; i++) {
@@ -775,7 +815,7 @@
775
815
  }
776
816
  if (time < 0) {
777
817
  this._active = false;
778
- if (this._duration === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
818
+ if (this._rawPrevTime >= 0 && this._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state.
779
819
  internalForce = true;
780
820
  }
781
821
  this._rawPrevTime = time;
@@ -838,11 +878,17 @@
838
878
  }
839
879
 
840
880
  if (this._onUpdate) if (!suppressEvents) {
881
+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.
882
+ _lazyRender();
883
+ }
841
884
  this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);
842
885
  }
843
886
 
844
887
  if (callback) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate
845
888
  if (isComplete) {
889
+ if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onComplete on a timeline that reports/checks tweened values.
890
+ _lazyRender();
891
+ }
846
892
  if (this._timeline.autoRemoveChildren) {
847
893
  this._enabled(false, false);
848
894
  }
@@ -1063,4 +1109,18 @@
1063
1109
 
1064
1110
  }, true);
1065
1111
 
1066
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
1112
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
1113
+
1114
+ //export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date)
1115
+ (function(name) {
1116
+ "use strict";
1117
+ var getGlobal = function() {
1118
+ return (_gsScope.GreenSockGlobals || _gsScope)[name];
1119
+ };
1120
+ if (typeof(define) === "function" && define.amd) { //AMD
1121
+ define(["TweenLite"], getGlobal);
1122
+ } else if (typeof(module) !== "undefined" && module.exports) { //node
1123
+ require("./TweenLite.js"); //dependency
1124
+ module.exports = getGlobal();
1125
+ }
1126
+ }("TimelineMax"));
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.12.1
3
- * DATE: 2014-06-26
2
+ * VERSION: 1.13.1
3
+ * DATE: 2014-07-22
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,10 +9,10 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  */
12
- (function(window) {
12
+ (function(window, moduleName) {
13
13
 
14
14
  "use strict";
15
- var _globals = window.GreenSockGlobals || window;
15
+ var _globals = window.GreenSockGlobals = window.GreenSockGlobals || window;
16
16
  if (_globals.TweenLite) {
17
17
  return; //in case the core set of classes is already loaded, don't instantiate twice.
18
18
  }
@@ -26,7 +26,13 @@
26
26
  },
27
27
  gs = _namespace("com.greensock"),
28
28
  _tinyNum = 0.0000000001,
29
- _slice = [].slice,
29
+ _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()
30
+ var b = [],
31
+ l = a.length,
32
+ i;
33
+ for (i = 0; i !== l; b.push(a[i++]));
34
+ return b;
35
+ },
30
36
  _emptyFunc = function() {},
31
37
  _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower)
32
38
  var toString = Object.prototype.toString,
@@ -58,7 +64,7 @@
58
64
  * </script>
59
65
  * <script src="js/greensock/v1.7/TweenMax.js"></script>
60
66
  * <script>
61
- * window.GreenSockGlobals = null; //reset it back to null so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...)
67
+ * window.GreenSockGlobals = window._gsQueue = null; //reset it back to null (along with the special _gsQueue variable) so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...)
62
68
  * </script>
63
69
  * <script src="js/greensock/v1.6/TweenMax.js"></script>
64
70
  * <script>
@@ -98,8 +104,8 @@
98
104
  if (global) {
99
105
  _globals[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.)
100
106
  if (typeof(define) === "function" && define.amd){ //AMD
101
- define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").join("/"), [], function() { return cl; });
102
- } else if (typeof(module) !== "undefined" && module.exports){ //node
107
+ define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").pop(), [], function() { return cl; });
108
+ } else if (ns === moduleName && typeof(module) !== "undefined" && module.exports){ //node
103
109
  module.exports = cl;
104
110
  }
105
111
  }
@@ -760,7 +766,6 @@
760
766
  if (!skipDisable) {
761
767
  tween._enabled(false, true);
762
768
  }
763
- tween.timeline = null;
764
769
 
765
770
  if (tween._prev) {
766
771
  tween._prev._next = tween._next;
@@ -772,6 +777,7 @@
772
777
  } else if (this._last === tween) {
773
778
  this._last = tween._prev;
774
779
  }
780
+ tween._next = tween._prev = tween.timeline = null;
775
781
 
776
782
  if (this._timeline) {
777
783
  this._uncache(true);
@@ -826,7 +832,7 @@
826
832
  this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite];
827
833
 
828
834
  if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") {
829
- this._targets = targets = _slice.call(target, 0);
835
+ this._targets = targets = _slice(target); //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll()
830
836
  this._propLookup = [];
831
837
  this._siblings = [];
832
838
  for (i = 0; i < targets.length; i++) {
@@ -842,7 +848,7 @@
842
848
  continue;
843
849
  } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself.
844
850
  targets.splice(i--, 1);
845
- this._targets = targets = targets.concat(_slice.call(targ, 0));
851
+ this._targets = targets = targets.concat(_slice(targ));
846
852
  continue;
847
853
  }
848
854
  this._siblings[i] = _register(targ, this, false);
@@ -888,7 +894,7 @@
888
894
  p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
889
895
  p._notifyPluginsOfEnabled = p._lazy = false;
890
896
 
891
- TweenLite.version = "1.12.1";
897
+ TweenLite.version = "1.13.1";
892
898
  TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
893
899
  TweenLite.defaultOverwrite = "auto";
894
900
  TweenLite.ticker = _ticker;
@@ -896,7 +902,15 @@
896
902
  TweenLite.lagSmoothing = function(threshold, adjustedLag) {
897
903
  _ticker.lagSmoothing(threshold, adjustedLag);
898
904
  };
899
- TweenLite.selector = window.$ || window.jQuery || function(e) { if (window.$) { TweenLite.selector = window.$; return window.$(e); } return window.document ? window.document.getElementById((e.charAt(0) === "#") ? e.substr(1) : e) : e; };
905
+
906
+ TweenLite.selector = window.$ || window.jQuery || function(e) {
907
+ var selector = window.$ || window.jQuery;
908
+ if (selector) {
909
+ TweenLite.selector = selector;
910
+ return selector(e);
911
+ }
912
+ return (typeof(document) === "undefined") ? e : (document.querySelectorAll ? document.querySelectorAll(e) : document.getElementById((e.charAt(0) === "#") ? e.substr(1) : e));
913
+ };
900
914
 
901
915
  var _lazyTweens = [],
902
916
  _lazyLookup = {},
@@ -908,7 +922,7 @@
908
922
  _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0},
909
923
  _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(),
910
924
  _rootTimeline = Animation._rootTimeline = new SimpleTimeline(),
911
- _lazyRender = function() {
925
+ _lazyRender = _internals.lazyRender = function() {
912
926
  var i = _lazyTweens.length;
913
927
  _lazyLookup = {};
914
928
  while (--i > -1) {
@@ -1106,12 +1120,9 @@
1106
1120
  }
1107
1121
  }
1108
1122
  }
1109
- if (!ease) {
1110
- this._ease = TweenLite.defaultEase;
1111
- } else if (ease instanceof Ease) {
1112
- this._ease = (v.easeParams instanceof Array) ? ease.config.apply(ease, v.easeParams) : ease;
1113
- } else {
1114
- this._ease = (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase;
1123
+ this._ease = ease = (!ease) ? TweenLite.defaultEase : (ease instanceof Ease) ? ease : (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase;
1124
+ if (v.easeParams instanceof Array && ease.config) {
1125
+ this._ease = ease.config.apply(ease, v.easeParams);
1115
1126
  }
1116
1127
  this._easeType = this._ease._type;
1117
1128
  this._easePower = this._ease._power;
@@ -1310,7 +1321,7 @@
1310
1321
  this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);
1311
1322
  }
1312
1323
  }
1313
- if (this._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occuring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time.
1324
+ if (this._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occurring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time.
1314
1325
  this._lazy = false;
1315
1326
  }
1316
1327
  if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {
@@ -1328,7 +1339,6 @@
1328
1339
  this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);
1329
1340
  }
1330
1341
  }
1331
-
1332
1342
  pt = this._firstPT;
1333
1343
  while (pt) {
1334
1344
  if (pt.f) {
@@ -1348,7 +1358,7 @@
1348
1358
  }
1349
1359
  }
1350
1360
 
1351
- if (callback) if (!this._gc) { //check _gc because there's a chance that kill() could be called in an onUpdate
1361
+ if (callback) if (!this._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate
1352
1362
  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.
1353
1363
  this._startAt.render(time, suppressEvents, force);
1354
1364
  }
@@ -1365,7 +1375,6 @@
1365
1375
  this._rawPrevTime = 0;
1366
1376
  }
1367
1377
  }
1368
-
1369
1378
  };
1370
1379
 
1371
1380
  p._kill = function(vars, target) {
@@ -1721,4 +1730,4 @@
1721
1730
 
1722
1731
  _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated
1723
1732
 
1724
- })(window);
1733
+ })((typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window, "TweenLite");