greensock-rails 1.19.1.2 → 1.20.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/greensock/rails/version.rb +1 -1
- data/vendor/assets/javascripts/greensock/TimelineLite.js +16 -11
- data/vendor/assets/javascripts/greensock/TimelineMax.js +19 -14
- data/vendor/assets/javascripts/greensock/TweenLite.js +27 -18
- data/vendor/assets/javascripts/greensock/TweenMax.js +162 -94
- data/vendor/assets/javascripts/greensock/easing/EasePack.js +11 -10
- data/vendor/assets/javascripts/greensock/plugins/AttrPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/BezierPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/CSSPlugin.js +95 -54
- data/vendor/assets/javascripts/greensock/plugins/CSSRulePlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js +12 -9
- data/vendor/assets/javascripts/greensock/plugins/DirectionalRotationPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/EaselPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/ModifiersPlugin.js +6 -6
- data/vendor/assets/javascripts/greensock/plugins/PixiPlugin.js +442 -0
- data/vendor/assets/javascripts/greensock/plugins/ScrollToPlugin.js +9 -13
- data/vendor/assets/javascripts/greensock/plugins/TextPlugin.js +37 -8
- data/vendor/assets/javascripts/greensock/utils/Draggable.js +47 -20
- metadata +8 -7
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 1.9.0
|
3
|
+
* DATE: 2017-06-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -14,7 +14,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
14
14
|
|
15
15
|
"use strict";
|
16
16
|
|
17
|
-
var _doc = document.documentElement,
|
17
|
+
var _doc = (_gsScope.document || {}).documentElement,
|
18
18
|
_window = _gsScope,
|
19
19
|
_max = function(element, axis) {
|
20
20
|
var dim = (axis === "x") ? "Width" : "Height",
|
@@ -60,19 +60,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
60
60
|
},
|
61
61
|
_parseVal = function(value, target, axis) {
|
62
62
|
var type = typeof(value);
|
63
|
-
|
64
|
-
return value;
|
65
|
-
} else if (value === "max") {
|
66
|
-
return _max(target, axis);
|
67
|
-
}
|
68
|
-
return Math.min(_max(target, axis), _getOffset(value, target)[axis]);
|
63
|
+
return !isNaN(value) ? parseFloat(value) : (type === "number" || (type === "string" && value.charAt(1) === "=")) ? value : (value === "max") ? _max(target, axis) : Math.min(_max(target, axis), _getOffset(value, target)[axis]);
|
69
64
|
},
|
70
65
|
|
71
66
|
ScrollToPlugin = _gsScope._gsDefine.plugin({
|
72
67
|
propName: "scrollTo",
|
73
68
|
API: 2,
|
74
69
|
global: true,
|
75
|
-
version:"1.
|
70
|
+
version:"1.9.0",
|
76
71
|
|
77
72
|
//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
|
78
73
|
init: function(target, value, tween) {
|
@@ -158,6 +153,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
158
153
|
|
159
154
|
ScrollToPlugin.max = _max;
|
160
155
|
ScrollToPlugin.getOffset = _getOffset;
|
156
|
+
ScrollToPlugin.buildGetter = _buildGetter;
|
161
157
|
ScrollToPlugin.autoKillThreshold = 7;
|
162
158
|
|
163
159
|
p._kill = function(lookup) {
|
@@ -178,10 +174,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
178
174
|
var getGlobal = function() {
|
179
175
|
return (_gsScope.GreenSockGlobals || _gsScope)[name];
|
180
176
|
};
|
181
|
-
if (typeof(
|
182
|
-
define(["TweenLite"], getGlobal);
|
183
|
-
} else if (typeof(module) !== "undefined" && module.exports) { //node
|
177
|
+
if (typeof(module) !== "undefined" && module.exports) { //node
|
184
178
|
require("../TweenLite.js");
|
185
179
|
module.exports = getGlobal();
|
180
|
+
} else if (typeof(define) === "function" && define.amd) { //AMD
|
181
|
+
define(["TweenLite"], getGlobal);
|
186
182
|
}
|
187
183
|
}("ScrollToPlugin"));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 0.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 0.6.0
|
3
|
+
* DATE: 2017-06-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
@@ -30,10 +30,39 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
30
30
|
}
|
31
31
|
return result;
|
32
32
|
},
|
33
|
+
_emojiStart = 0xD800,
|
34
|
+
_emojiEnd = 0xDBFF,
|
35
|
+
_emojiLowStart = 0xDC00,
|
36
|
+
_emojiRegionStart = 0x1F1E6,
|
37
|
+
_emojiRegionEnd = 0x1F1FF,
|
38
|
+
_emojiModStart = 0x1f3fb,
|
39
|
+
_emojiModEnd = 0x1f3ff,
|
40
|
+
_emojiPairCode = function(s) {
|
41
|
+
return ((s.charCodeAt(0) - _emojiStart) << 10) + (s.charCodeAt(1) - _emojiLowStart) + 0x10000;
|
42
|
+
},
|
43
|
+
_emojiSafeSplit = function(text, delimiter) { //like calling String.split(delimiter) except that it keeps emoji characters together.
|
44
|
+
if (delimiter !== "") {
|
45
|
+
return text.split(delimiter);
|
46
|
+
}
|
47
|
+
var l = text.length,
|
48
|
+
a = [],
|
49
|
+
character, i, emojiPair1, emojiPair2, j;
|
50
|
+
for (i = 0; i < l; i++) {
|
51
|
+
character = text.charAt(i);
|
52
|
+
if ((character.charCodeAt(0) >= _emojiStart && character.charCodeAt(0) <= _emojiEnd) || (text.charCodeAt(i+1) >= 0xFE00 && text.charCodeAt(i+1) <= 0xFE0F)) { //special emoji characters use 2 or 4 unicode characters that we must keep together.
|
53
|
+
emojiPair1 = _emojiPairCode(text.substr(i, 2));
|
54
|
+
emojiPair2 = _emojiPairCode(text.substr(i + 2, 2));
|
55
|
+
j = ((emojiPair1 >= _emojiRegionStart && emojiPair1 <= _emojiRegionEnd && emojiPair2 >= _emojiRegionStart && emojiPair2 <= _emojiRegionEnd) || (emojiPair2 >= _emojiModStart && emojiPair2 <= _emojiModEnd)) ? 4 : 2;
|
56
|
+
a.push(text.substr(i, j));
|
57
|
+
i += j - 1;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
return a;
|
61
|
+
},
|
33
62
|
TextPlugin = _gsScope._gsDefine.plugin({
|
34
63
|
propName: "text",
|
35
64
|
API: 2,
|
36
|
-
version:"0.
|
65
|
+
version:"0.6.0",
|
37
66
|
|
38
67
|
//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
|
39
68
|
init: function(target, value, tween, index) {
|
@@ -55,8 +84,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
55
84
|
return true;
|
56
85
|
}
|
57
86
|
this._delimiter = value.delimiter || "";
|
58
|
-
this._original = _getText(target).replace(/\s+/g, " ")
|
59
|
-
this._text = value.value.replace(/\s+/g, " ")
|
87
|
+
this._original = _emojiSafeSplit(_getText(target).replace(/\s+/g, " "), this._delimiter);
|
88
|
+
this._text = _emojiSafeSplit(value.value.replace(/\s+/g, " "), this._delimiter);
|
60
89
|
this._runBackwards = (tween.vars.runBackwards === true);
|
61
90
|
if (this._runBackwards) {
|
62
91
|
i = this._original;
|
@@ -123,10 +152,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
123
152
|
var getGlobal = function() {
|
124
153
|
return (_gsScope.GreenSockGlobals || _gsScope)[name];
|
125
154
|
};
|
126
|
-
if (typeof(
|
127
|
-
define(["TweenLite"], getGlobal);
|
128
|
-
} else if (typeof(module) !== "undefined" && module.exports) { //node
|
155
|
+
if (typeof(module) !== "undefined" && module.exports) { //node
|
129
156
|
require("../TweenLite.js");
|
130
157
|
module.exports = getGlobal();
|
158
|
+
} else if (typeof(define) === "function" && define.amd) { //AMD
|
159
|
+
define(["TweenLite"], getGlobal);
|
131
160
|
}
|
132
161
|
}("TextPlugin"));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 0.15.
|
3
|
-
* DATE: 2017-
|
2
|
+
* VERSION: 0.15.1
|
3
|
+
* DATE: 2017-06-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* Requires TweenLite and CSSPlugin version 1.17.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).
|
@@ -45,7 +45,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
45
45
|
_dragCount = 0, //total number of elements currently being dragged
|
46
46
|
_prefix,
|
47
47
|
_isMultiTouching,
|
48
|
-
_isAndroid = (navigator.userAgent.toLowerCase().indexOf("android") !== -1), //Android handles touch events in an odd way and it's virtually impossible to "feature test" so we resort to UA sniffing
|
48
|
+
_isAndroid = (_gsScope.navigator && _gsScope.navigator.userAgent.toLowerCase().indexOf("android") !== -1), //Android handles touch events in an odd way and it's virtually impossible to "feature test" so we resort to UA sniffing
|
49
49
|
_lastDragTime = 0,
|
50
50
|
_temp1 = {}, // a simple object we reuse and populate (usually x/y properties) to conserve memory and improve performance.
|
51
51
|
_windowProxy = {}, //memory/performance optimization - we reuse this object during autoScroll to store window-related bounds/offsets.
|
@@ -318,6 +318,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
318
318
|
wrapper = _createElement("div"),
|
319
319
|
style = div.style,
|
320
320
|
parent = _doc.body || _docElement,
|
321
|
+
isFlex = (_getStyle(parent, "display", true) === "flex"), //Firefox bug causes getScreenCTM() to return null when parent is display:flex and the element isn't rendered inside the window (like if it's below the scroll position)
|
321
322
|
matrix, e1, point, oldValue;
|
322
323
|
if (_doc.body && _transformProp) {
|
323
324
|
style.position = "absolute";
|
@@ -355,6 +356,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
355
356
|
parent.removeChild(div);
|
356
357
|
// -- end _svgScrollOffset calculation.
|
357
358
|
parent.appendChild(svg);
|
359
|
+
if (isFlex) {
|
360
|
+
parent.style.display = "block"; //Firefox bug causes getScreenCTM() to return null when parent is display:flex and the element isn't rendered inside the window (like if it's below the scroll position)
|
361
|
+
}
|
358
362
|
matrix = svg.getScreenCTM();
|
359
363
|
e1 = matrix.e;
|
360
364
|
style.border = "50px solid red";
|
@@ -366,6 +370,9 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
366
370
|
_svgBorderFactor = (e1 !== matrix.e) ? 1 : 0;
|
367
371
|
_svgBorderScales = (matrix.a !== 1);
|
368
372
|
}
|
373
|
+
if (isFlex) {
|
374
|
+
parent.style.display = "flex";
|
375
|
+
}
|
369
376
|
parent.removeChild(svg);
|
370
377
|
},
|
371
378
|
|
@@ -377,7 +384,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
377
384
|
_transformPropCSS = _transformProp.replace(/^ms/g, "Ms").replace(/([A-Z])/g, "-$1").toLowerCase(),
|
378
385
|
_point1 = {}, //we reuse _point1 and _point2 objects inside matrix and point conversion methods to conserve memory and minimize garbage collection tasks.
|
379
386
|
_point2 = {},
|
380
|
-
_SVGElement =
|
387
|
+
_SVGElement = _gsScope.SVGElement,
|
381
388
|
_isSVG = function(e) {
|
382
389
|
return !!(_SVGElement && typeof(e.getBBox) === "function" && e.getCTM && (!e.parentNode || (e.parentNode.getBBox && e.parentNode.getCTM)));
|
383
390
|
},
|
@@ -496,7 +503,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
496
503
|
}
|
497
504
|
decoratee.x = ((x.indexOf("%") !== -1) ? e.offsetWidth * parseFloat(x) / 100 : parseFloat(x));
|
498
505
|
decoratee.y = ((y.indexOf("%") !== -1) ? e.offsetHeight * parseFloat(y) / 100 : parseFloat(y));
|
499
|
-
|
500
506
|
}
|
501
507
|
return decoratee;
|
502
508
|
},
|
@@ -529,7 +535,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
529
535
|
}
|
530
536
|
return cache;
|
531
537
|
},
|
532
|
-
_getOffset2DMatrix = function(e, offsetOrigin, parentOffsetOrigin, zeroOrigin) {
|
538
|
+
_getOffset2DMatrix = function(e, offsetOrigin, parentOffsetOrigin, zeroOrigin, isBase) { //"isBase" helps us discern context - it should only be true when the element is the base one (the one at which we're starting to walk up the chain). It only matters in cases when it's an <svg> element itself because that's a case when we don't apply scaling.
|
533
539
|
if (e === window || !e || !e.style || !e.parentNode) {
|
534
540
|
return [1,0,0,1,0,0];
|
535
541
|
}
|
@@ -584,17 +590,21 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
584
590
|
offsetOrigin.y -= offsetY;
|
585
591
|
sx = offsets.scaleX;
|
586
592
|
sy = offsets.scaleY;
|
587
|
-
|
588
|
-
|
593
|
+
if (!isBase) { //when getting the matrix for a root <svg> element itself (NOT in the context of an SVE element that's nested inside of it like a <path>), we do NOT apply the scaling!
|
594
|
+
offsetOrigin.x *= sx;
|
595
|
+
offsetOrigin.y *= sy;
|
596
|
+
}
|
589
597
|
m[0] *= sx;
|
590
598
|
m[1] *= sy;
|
591
599
|
m[2] *= sx;
|
592
600
|
m[3] *= sy;
|
593
|
-
|
594
601
|
if (!_isIE10orBelow) {
|
595
602
|
offsetOrigin.x += borderTranslateX;
|
596
603
|
offsetOrigin.y += borderTranslateY;
|
597
604
|
}
|
605
|
+
if (parentOffsetParent === _doc.body && offsets.offsetParent === _docElement) { //to avoid issues with margin/padding on the <body>, we always set the offsetParent to _docElement in the _getSVGOffsets() function but there's a condition we check later in this function for (parentOffsetParent === offsets.offsetParent) which would fail if we don't run this logic. In other words, parentOffsetParent may be <body> and the <svg>'s offsetParent is also <body> but artificially set to _docElement to avoid margin/padding issues.
|
606
|
+
parentOffsetParent = _docElement;
|
607
|
+
}
|
598
608
|
} else if (!_hasBorderBug && e.offsetParent) {
|
599
609
|
offsetOrigin.x += parseInt(_getStyle(e.offsetParent, "borderLeftWidth"), 10) || 0;
|
600
610
|
offsetOrigin.y += parseInt(_getStyle(e.offsetParent, "borderTopWidth"), 10) || 0;
|
@@ -625,7 +635,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
625
635
|
//note: we keep reusing _point1 and _point2 in order to minimize memory usage and garbage collection chores.
|
626
636
|
var originOffset = _getOffsetTransformOrigin(e, _point1),
|
627
637
|
parentOriginOffset = _getOffsetTransformOrigin(e.parentNode, _point2),
|
628
|
-
m = _getOffset2DMatrix(e, originOffset, parentOriginOffset),
|
638
|
+
m = _getOffset2DMatrix(e, originOffset, parentOriginOffset, false, true),
|
629
639
|
a, b, c, d, tx, ty, m2, determinant;
|
630
640
|
while ((e = e.parentNode) && e.parentNode && e !== _docElement) {
|
631
641
|
originOffset = parentOriginOffset;
|
@@ -1162,6 +1172,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1162
1172
|
clickTime = 0,
|
1163
1173
|
enabled, scrollProxy, startPointerX, startPointerY, startElementX, startElementY, hasBounds, hasDragCallback, maxX, minX, maxY, minY, tempVars, cssVars, touch, touchID, rotationOrigin, dirty, old, snapX, snapY, snapXY, isClicking, touchEventTarget, matrix, interrupted, startScrollTop, startScrollLeft, applyObj, allowNativeTouchScrolling, touchDragAxis, isDispatching, clickDispatch, trustedClickDispatch,
|
1164
1174
|
|
1175
|
+
onContextMenu = function(e) { //used to prevent long-touch from triggering a context menu.
|
1176
|
+
if (self.isPressed && e.which < 2) {
|
1177
|
+
self.endDrag();
|
1178
|
+
} else {
|
1179
|
+
e.preventDefault();
|
1180
|
+
e.stopPropagation();
|
1181
|
+
return false;
|
1182
|
+
}
|
1183
|
+
},
|
1184
|
+
|
1165
1185
|
//this method gets called on every tick of TweenLite.ticker which allows us to synchronize the renders to the core engine (which is typically synchronized with the display refresh via requestAnimationFrame). This is an optimization - it's better than applying the values inside the "mousemove" or "touchmove" event handler which may get called many times inbetween refreshes.
|
1166
1186
|
render = function(suppressEvents) {
|
1167
1187
|
if (self.autoScroll && self.isDragging && (checkAutoScrollBounds || dirty)) {
|
@@ -1430,7 +1450,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1430
1450
|
}
|
1431
1451
|
self.isThrowing = true;
|
1432
1452
|
overshootTolerance = (!isNaN(vars.overshootTolerance)) ? vars.overshootTolerance : (vars.edgeResistance === 1) ? 0 : (1 - self.edgeResistance) + 0.2;
|
1433
|
-
self.tween = tween = ThrowPropsPlugin.to(scrollProxy || target, {throwProps:throwProps, ease:(vars.ease || _globals.Power3.easeOut), onComplete:onThrowComplete, onOverwrite:onThrowOverwrite, onUpdate:(vars.fastMode ? _dispatchEvent : syncXY), onUpdateParams:(vars.fastMode ? [self, "onthrowupdate", "onThrowUpdate"] : (snap && snap.radius) ? [false, true] : _emptyArray)}, (isNaN(vars.maxDuration) ? 2 : vars.maxDuration), (!isNaN(vars.minDuration) ? vars.minDuration : (overshootTolerance === 0) ? 0 : 0.5), overshootTolerance);
|
1453
|
+
self.tween = tween = ThrowPropsPlugin.to(scrollProxy || target, {throwProps:throwProps, ease:(vars.ease || _globals.Power3.easeOut), onComplete:onThrowComplete, onOverwrite:onThrowOverwrite, onUpdate:(vars.fastMode ? _dispatchEvent : syncXY), onUpdateParams:(vars.fastMode ? [self, "onthrowupdate", "onThrowUpdate"] : (snap && snap.radius) ? [false, true] : _emptyArray)}, (isNaN(vars.maxDuration) ? 2 : vars.maxDuration), (!isNaN(vars.minDuration) ? vars.minDuration : (overshootTolerance === 0 || (typeof(throwProps) === "object" && throwProps.resistance > 1000)) ? 0 : 0.5), overshootTolerance);
|
1434
1454
|
if (!vars.fastMode) {
|
1435
1455
|
//to populate the end values, we just scrub the tween to the end, record the values, and then jump back to the beginning.
|
1436
1456
|
if (scrollProxy) {
|
@@ -1501,7 +1521,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1501
1521
|
self.applyBounds();
|
1502
1522
|
}
|
1503
1523
|
if (rotationMode) {
|
1504
|
-
rotationOrigin = _localToGlobal(target, {x:0, y:0});
|
1524
|
+
rotationOrigin = self.rotationOrigin = _localToGlobal(target, {x:0, y:0});
|
1505
1525
|
syncXY(true, true);
|
1506
1526
|
startElementX = self.x; //starting rotation (x always refers to rotation in type:"rotation", measured in degrees)
|
1507
1527
|
startElementY = self.y = Math.atan2(rotationOrigin.y - self.pointerY, self.pointerX - rotationOrigin.x) * _RAD2DEG;
|
@@ -1571,7 +1591,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1571
1591
|
},
|
1572
1592
|
|
1573
1593
|
buildPointSnapFunc = function(snap, minX, maxX, minY, maxY, radius, factor) {
|
1574
|
-
radius = radius
|
1594
|
+
radius = (radius && radius < _max) ? radius * radius : _max; //so we don't have to Math.sqrt() in the functions. Performance optimization.
|
1575
1595
|
if (typeof(snap) === "function") {
|
1576
1596
|
return function(point) {
|
1577
1597
|
var edgeTolerance = !self.isPressed ? 1 : 1 - self.edgeResistance,
|
@@ -1592,7 +1612,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1592
1612
|
if (radius < _max) {
|
1593
1613
|
dx = point.x - x;
|
1594
1614
|
dy = point.y - y;
|
1595
|
-
if (
|
1615
|
+
if (dx * dx + dy * dy > radius) {
|
1596
1616
|
point.x = x;
|
1597
1617
|
point.y = y;
|
1598
1618
|
}
|
@@ -1610,7 +1630,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1610
1630
|
point = snap[i];
|
1611
1631
|
x = point.x - p.x;
|
1612
1632
|
y = point.y - p.y;
|
1613
|
-
dist =
|
1633
|
+
dist = x * x + y * y;
|
1614
1634
|
if (dist < minDist) {
|
1615
1635
|
closest = i;
|
1616
1636
|
minDist = dist;
|
@@ -1843,7 +1863,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1843
1863
|
}
|
1844
1864
|
}
|
1845
1865
|
}
|
1846
|
-
if (!rotationMode) {
|
1866
|
+
if (!rotationMode && !matrix) {
|
1847
1867
|
x = Math.round(x); //helps work around an issue with some Win Touch devices
|
1848
1868
|
y = Math.round(y);
|
1849
1869
|
}
|
@@ -2179,6 +2199,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2179
2199
|
}
|
2180
2200
|
_setStyle(trigger, "touchCallout", "none");
|
2181
2201
|
_setStyle(trigger, "touchAction", (allowX === allowY) ? "none" : allowX ? "pan-y" : "pan-x");
|
2202
|
+
if (_isSVG(trigger)) { // a bug in chrome doesn't respect touch-action on SVG elements - it only works if we set it on the parent SVG.
|
2203
|
+
_setStyle(trigger.ownerSVGElement || trigger, "touchAction", (allowX === allowY) ? "none" : allowX ? "pan-y" : "pan-x");
|
2204
|
+
}
|
2205
|
+
if (!this.vars.allowContextMenu) {
|
2206
|
+
_addListener(trigger, "contextmenu", onContextMenu);
|
2207
|
+
}
|
2182
2208
|
}
|
2183
2209
|
_setSelectable(triggers, false);
|
2184
2210
|
}
|
@@ -2225,6 +2251,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2225
2251
|
_removeListener(trigger, "mousedown", onPress);
|
2226
2252
|
_removeListener(trigger, "touchstart", onPress);
|
2227
2253
|
_removeListener(trigger, "click", onClick);
|
2254
|
+
_removeListener(trigger, "contextmenu", onContextMenu);
|
2228
2255
|
}
|
2229
2256
|
_setSelectable(triggers, true);
|
2230
2257
|
if (touchEventTarget) {
|
@@ -2304,7 +2331,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2304
2331
|
p.constructor = Draggable;
|
2305
2332
|
p.pointerX = p.pointerY = p.startX = p.startY = p.deltaX = p.deltaY = 0;
|
2306
2333
|
p.isDragging = p.isPressed = false;
|
2307
|
-
Draggable.version = "0.15.
|
2334
|
+
Draggable.version = "0.15.1";
|
2308
2335
|
Draggable.zIndex = 1000;
|
2309
2336
|
|
2310
2337
|
_addListener(_doc, "touchcancel", function() {
|
@@ -2412,11 +2439,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2412
2439
|
var getGlobal = function() {
|
2413
2440
|
return (_gsScope.GreenSockGlobals || _gsScope)[name];
|
2414
2441
|
};
|
2415
|
-
if (typeof(
|
2416
|
-
define(["TweenLite", "CSSPlugin"], getGlobal);
|
2417
|
-
} else if (typeof(module) !== "undefined" && module.exports) { //node
|
2442
|
+
if (typeof(module) !== "undefined" && module.exports) { //node
|
2418
2443
|
require("../TweenLite.js");
|
2419
2444
|
require("../plugins/CSSPlugin.js");
|
2420
2445
|
module.exports = getGlobal();
|
2446
|
+
} else if (typeof(define) === "function" && define.amd) { //AMD
|
2447
|
+
define(["TweenLite", "CSSPlugin"], getGlobal);
|
2421
2448
|
}
|
2422
2449
|
}("Draggable"));
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: greensock-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.20.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Pataki, Greensock Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.14.3
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.14.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 12.0.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 12.0.0
|
41
41
|
description: This gem provides TweenMax, TweenLite, TimelineMax, TimelineLite, and
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- vendor/assets/javascripts/greensock/plugins/EaselPlugin.js
|
66
66
|
- vendor/assets/javascripts/greensock/plugins/EndArrayPlugin.js
|
67
67
|
- vendor/assets/javascripts/greensock/plugins/ModifiersPlugin.js
|
68
|
+
- vendor/assets/javascripts/greensock/plugins/PixiPlugin.js
|
68
69
|
- vendor/assets/javascripts/greensock/plugins/RaphaelPlugin.js
|
69
70
|
- vendor/assets/javascripts/greensock/plugins/RoundPropsPlugin.js
|
70
71
|
- vendor/assets/javascripts/greensock/plugins/ScrollToPlugin.js
|
@@ -91,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
92
|
version: '0'
|
92
93
|
requirements: []
|
93
94
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.6.11
|
95
96
|
signing_key:
|
96
97
|
specification_version: 4
|
97
98
|
summary: Use GSAP with Rails 3.1 or later
|