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
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: beta 0.6.1
3
- * DATE: 2014-01-20
2
+ * VERSION: beta 0.6.2
3
+ * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,11 +9,12 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  */
12
- (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() {
13
14
 
14
15
  "use strict";
15
16
 
16
- window._gsDefine("plugins.CSSRulePlugin", ["plugins.TweenPlugin","TweenLite","plugins.CSSPlugin"], function(TweenPlugin, TweenLite, CSSPlugin) {
17
+ _gsScope._gsDefine("plugins.CSSRulePlugin", ["plugins.TweenPlugin","TweenLite","plugins.CSSPlugin"], function(TweenPlugin, TweenLite, CSSPlugin) {
17
18
 
18
19
  /** @constructor **/
19
20
  var CSSRulePlugin = function() {
@@ -26,7 +27,7 @@
26
27
 
27
28
  p._propName = "cssRule";
28
29
  p.constructor = CSSRulePlugin;
29
- CSSRulePlugin.version = "0.6.1";
30
+ CSSRulePlugin.version = "0.6.2";
30
31
  CSSRulePlugin.API = 2;
31
32
 
32
33
  /**
@@ -98,4 +99,4 @@
98
99
 
99
100
  }, true);
100
101
 
101
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
102
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: beta 1.2.0
3
- * DATE: 2013-03-01
2
+ * VERSION: beta 1.2.1
3
+ * DATE: 2013-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,8 +9,8 @@
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
 
@@ -74,8 +74,9 @@
74
74
  return color.match(_numExp) || _colorLookup.transparent;
75
75
  };
76
76
 
77
- window._gsDefine.plugin({
77
+ _gsScope._gsDefine.plugin({
78
78
  propName: "colorProps",
79
+ version: "1.2.1",
79
80
  priority: -1,
80
81
  API: 2,
81
82
 
@@ -119,4 +120,4 @@
119
120
  }
120
121
  });
121
122
 
122
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
123
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: beta 0.2.0
3
- * DATE: 2013-05-07
2
+ * VERSION: beta 0.2.1
3
+ * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,14 +9,15 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  **/
12
- (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() {
13
14
 
14
15
  "use strict";
15
16
 
16
- window._gsDefine.plugin({
17
+ _gsScope._gsDefine.plugin({
17
18
  propName: "directionalRotation",
19
+ version: "0.2.1",
18
20
  API: 2,
19
- version: "0.2.0",
20
21
 
21
22
  //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
22
23
  init: function(target, value, tween) {
@@ -77,4 +78,4 @@
77
78
 
78
79
  })._autoCSS = true;
79
80
 
80
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
81
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * VERSION: 0.1.6
3
- * DATE: 2014-04-08
3
+ * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,7 +9,8 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  **/
12
- (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() {
13
14
 
14
15
  "use strict";
15
16
 
@@ -54,7 +55,7 @@
54
55
  },
55
56
  _parseColorFilter = function(t, v, pg) {
56
57
  if (!_ColorFilter) {
57
- _ColorFilter = (window.ColorFilter || window.createjs.ColorFilter);
58
+ _ColorFilter = (_gsScope.ColorFilter || _gsScope.createjs.ColorFilter);
58
59
  if (!_ColorFilter) {
59
60
  throw("EaselPlugin error: The EaselJS ColorFilter JavaScript file wasn't loaded.");
60
61
  }
@@ -175,7 +176,7 @@
175
176
 
176
177
  _parseColorMatrixFilter = function(t, v, pg) {
177
178
  if (!_ColorMatrixFilter) {
178
- _ColorMatrixFilter = (window.ColorMatrixFilter || window.createjs.ColorMatrixFilter);
179
+ _ColorMatrixFilter = (_gsScope.ColorMatrixFilter || _gsScope.createjs.ColorMatrixFilter);
179
180
  if (!_ColorMatrixFilter) {
180
181
  throw("EaselPlugin error: The EaselJS ColorMatrixFilter JavaScript file wasn't loaded.");
181
182
  }
@@ -225,7 +226,7 @@
225
226
  };
226
227
 
227
228
 
228
- window._gsDefine.plugin({
229
+ _gsScope._gsDefine.plugin({
229
230
  propName: "easel",
230
231
  priority: -1,
231
232
  version: "0.1.6",
@@ -296,4 +297,4 @@
296
297
 
297
298
  });
298
299
 
299
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
300
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 0.1.1
3
- * DATE: 2014-04-08
2
+ * VERSION: 0.1.2
3
+ * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,14 +9,15 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  */
12
- (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() {
13
14
 
14
15
  "use strict";
15
16
 
16
- window._gsDefine.plugin({
17
+ _gsScope._gsDefine.plugin({
17
18
  propName: "endArray",
18
19
  API: 2,
19
- version: "0.1.1",
20
+ version: "0.1.2",
20
21
 
21
22
  //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
22
23
  init: function(target, value, tween) {
@@ -66,4 +67,4 @@
66
67
 
67
68
  });
68
69
 
69
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
70
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 0.5.1
3
- * DATE: 2014-02-14
2
+ * VERSION: 0.5.2
3
+ * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,7 +9,8 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  */
12
- (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() {
13
14
 
14
15
  "use strict";
15
16
 
@@ -18,7 +19,7 @@
18
19
  _setterFuncs = {},
19
20
  _numExp = /(\d|\.)+/g,
20
21
  _directionalRotationExp = /(?:_cw|_ccw|_short)/,
21
- _plugins = window._gsDefine.globals.com.greensock.plugins,
22
+ _plugins = _gsScope._gsDefine.globals.com.greensock.plugins,
22
23
  _colorLookup = {aqua:[0,255,255],
23
24
  lime:[0,255,0],
24
25
  silver:[192,192,192],
@@ -180,10 +181,10 @@
180
181
  }
181
182
  }
182
183
 
183
- var KineticPlugin = window._gsDefine.plugin({
184
+ var KineticPlugin = _gsScope._gsDefine.plugin({
184
185
  propName: "kinetic",
185
186
  API: 2,
186
- version: "0.5.1",
187
+ version: "0.5.2",
187
188
 
188
189
  //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
189
190
  init: function(target, value, tween) {
@@ -331,4 +332,4 @@
331
332
  }
332
333
  };
333
334
 
334
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
335
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 0.2.1
3
- * DATE: 2014-04-08
2
+ * VERSION: 0.2.2
3
+ * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,7 +9,8 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  */
12
- (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() {
13
14
 
14
15
  "use strict";
15
16
 
@@ -110,9 +111,9 @@
110
111
  },
111
112
 
112
113
 
113
- RaphaelPlugin = window._gsDefine.plugin({
114
+ RaphaelPlugin = _gsScope._gsDefine.plugin({
114
115
  propName: "raphael",
115
- version: "0.2.1",
116
+ version: "0.2.2",
116
117
  API: 2,
117
118
 
118
119
  //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
@@ -365,4 +366,4 @@
365
366
  }
366
367
  };
367
368
 
368
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
369
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: beta 1.4.0
3
- * DATE: 2013-02-27
2
+ * VERSION: beta 1.4.1
3
+ * DATE: 2014-07-17
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,14 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  **/
12
- (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() {
13
14
 
14
15
  "use strict";
15
16
 
16
- var RoundPropsPlugin = window._gsDefine.plugin({
17
+ var RoundPropsPlugin = _gsScope._gsDefine.plugin({
17
18
  propName: "roundProps",
19
+ version: "1.4.1",
18
20
  priority: -1,
19
21
  API: 2,
20
22
 
@@ -70,4 +72,4 @@
70
72
  this._overwriteProps.push(p);
71
73
  };
72
74
 
73
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
75
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.7.3
3
- * DATE: 2014-01-14
2
+ * VERSION: 1.7.4
3
+ * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,7 +9,8 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  **/
12
- (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() {
13
14
 
14
15
  "use strict";
15
16
 
@@ -23,10 +24,10 @@
23
24
  return (element === _window || element === _doc || element === body) ? Math.max(_doc[scroll], body[scroll]) - (_window["inner" + dim] || Math.max(_doc[client], body[client])) : element[scroll] - element["offset" + dim];
24
25
  },
25
26
 
26
- ScrollToPlugin = window._gsDefine.plugin({
27
+ ScrollToPlugin = _gsScope._gsDefine.plugin({
27
28
  propName: "scrollTo",
28
29
  API: 2,
29
- version:"1.7.3",
30
+ version:"1.7.4",
30
31
 
31
32
  //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
32
33
  init: function(target, value, tween) {
@@ -36,6 +37,7 @@
36
37
  if (typeof(value) !== "object") {
37
38
  value = {y:value}; //if we don't receive an object as the parameter, assume the user intends "y".
38
39
  }
40
+ this.vars = value;
39
41
  this._autoKill = (value.autoKill !== false);
40
42
  this.x = this.xPrev = this.getX();
41
43
  this.y = this.yPrev = this.getY();
@@ -73,6 +75,9 @@
73
75
  }
74
76
  if (this.skipX && this.skipY) {
75
77
  this._tween.kill();
78
+ if (this.vars.onAutoKill) {
79
+ this.vars.onAutoKill.apply(this.vars.onAutoKillScope || this._tween, this.vars.onAutoKillParams || []);
80
+ }
76
81
  }
77
82
  }
78
83
  if (this._wdw) {
@@ -112,4 +117,4 @@
112
117
  return this._super._kill.call(this, lookup);
113
118
  };
114
119
 
115
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
120
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 1.1.0
3
- * DATE: 2013-02-28
2
+ * VERSION: 1.1.1
3
+ * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * This file is to be used as a simple template for writing your own plugin. See the
@@ -16,11 +16,12 @@
16
16
  *
17
17
  * @author: Jack Doyle, jack@greensock.com
18
18
  **/
19
- (window._gsQueue || (window._gsQueue = [])).push( function() {
19
+ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
20
+ (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
20
21
  //ignore the line above this and at the very end - those are for ensuring things load in the proper order
21
22
  "use strict";
22
23
 
23
- window._gsDefine.plugin({
24
+ _gsScope._gsDefine.plugin({
24
25
  propName: "yourCustomProperty", //the name of the property that will get intercepted and handled by this plugin (obviously change it to whatever you want, typically it is camelCase starting with lowercase).
25
26
  priority: 0, //the priority in the rendering pipeline (0 by default). A priority of -1 would mean this plugin will run after all those with 0 or greater. A priority of 1 would get run before 0, etc. This only matters when a plugin relies on other plugins finishing their work before it runs (or visa-versa)
26
27
  API: 2, //the API should stay 2 - it just gives us a way to know the method/property structure so that if in the future we change to a different TweenPlugin architecture, we can identify this plugin's structure.
@@ -71,4 +72,4 @@
71
72
 
72
73
  });
73
74
 
74
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
75
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 0.5.0
3
- * DATE: 2013-07-10
2
+ * VERSION: 0.5.1
3
+ * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
6
  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
@@ -9,7 +9,8 @@
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
11
11
  */
12
- (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() {
13
14
 
14
15
  "use strict";
15
16
 
@@ -29,10 +30,10 @@
29
30
  }
30
31
  return result;
31
32
  },
32
- TextPlugin = window._gsDefine.plugin({
33
+ TextPlugin = _gsScope._gsDefine.plugin({
33
34
  propName: "text",
34
35
  API: 2,
35
- version:"0.5.0",
36
+ version:"0.5.1",
36
37
 
37
38
  //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
38
39
  init: function(target, value, tween) {
@@ -105,4 +106,4 @@
105
106
 
106
107
  p._newClass = p._oldClass = p._delimiter = "";
107
108
 
108
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
109
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * VERSION: 0.10.4
3
- * DATE: 2014-06-25
2
+ * VERSION: 0.10.5
3
+ * DATE: 2014-07-17
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/).
@@ -11,11 +11,12 @@
11
11
  *
12
12
  * @author: Jack Doyle, jack@greensock.com
13
13
  */
14
- (window._gsQueue || (window._gsQueue = [])).push( function() {
14
+ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
15
+ (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
15
16
 
16
17
  "use strict";
17
18
 
18
- window._gsDefine("utils.Draggable", ["events.EventDispatcher","TweenLite"], function(EventDispatcher, TweenLite) {
19
+ _gsScope._gsDefine("utils.Draggable", ["events.EventDispatcher","TweenLite"], function(EventDispatcher, TweenLite) {
19
20
 
20
21
  var _tempVarsXY = {css:{}}, //speed optimization - we reuse the same vars object for x/y TweenLite.set() calls to minimize garbage collection tasks and improve performance.
21
22
  _tempVarsX = {css:{}},
@@ -772,7 +773,7 @@
772
773
  EventDispatcher.call(this, target);
773
774
  target = _unwrapElement(target); //in case the target is a selector object or selector text
774
775
  if (!ThrowPropsPlugin) {
775
- ThrowPropsPlugin = (window.GreenSockGlobals || window).com.greensock.plugins.ThrowPropsPlugin;
776
+ ThrowPropsPlugin = (_gsScope.GreenSockGlobals || _gsScope).com.greensock.plugins.ThrowPropsPlugin;
776
777
  }
777
778
  this.vars = vars = vars || {};
778
779
  this.target = target;
@@ -1235,6 +1236,10 @@
1235
1236
  }
1236
1237
  }
1237
1238
  }
1239
+ if (!rotationMode) {
1240
+ x = Math.round(x); //helps work around an issue with some Win Touch devices
1241
+ y = Math.round(y);
1242
+ }
1238
1243
  if (self.x !== x || (self.y !== y && !rotationMode)) {
1239
1244
  self.x = self.endX = x;
1240
1245
  if (rotationMode) {
@@ -1536,7 +1541,7 @@
1536
1541
  p.constructor = Draggable;
1537
1542
  p.pointerX = p.pointerY = 0;
1538
1543
  p.isDragging = p.isPressed = false;
1539
- Draggable.version = "0.10.4";
1544
+ Draggable.version = "0.10.5";
1540
1545
  Draggable.zIndex = 1000;
1541
1546
 
1542
1547
  _addListener(_doc, "touchcancel", function() {
@@ -1614,4 +1619,19 @@
1614
1619
  }, true);
1615
1620
 
1616
1621
 
1617
- }); if (window._gsDefine) { window._gsQueue.pop()(); }
1622
+ }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
1623
+
1624
+ //export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date)
1625
+ (function(name) {
1626
+ "use strict";
1627
+ var getGlobal = function() {
1628
+ return (_gsScope.GreenSockGlobals || _gsScope)[name];
1629
+ };
1630
+ if (typeof(define) === "function" && define.amd) { //AMD
1631
+ define(["TweenLite"], getGlobal);
1632
+ } else if (typeof(module) !== "undefined" && module.exports) { //node
1633
+ require("../TweenLite.js");
1634
+ require("../plugins/CSSPlugin.js");
1635
+ module.exports = getGlobal();
1636
+ }
1637
+ }("Draggable"));