greensock-rails 1.18.2.0 → 1.18.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/greensock/rails/version.rb +1 -1
- data/vendor/assets/javascripts/greensock/TimelineLite.js +3 -3
- data/vendor/assets/javascripts/greensock/TimelineMax.js +5 -5
- data/vendor/assets/javascripts/greensock/TweenLite.js +6 -6
- data/vendor/assets/javascripts/greensock/TweenMax.js +104 -48
- data/vendor/assets/javascripts/greensock/plugins/BezierPlugin.js +7 -7
- data/vendor/assets/javascripts/greensock/plugins/CSSPlugin.js +84 -27
- data/vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js +4 -4
- data/vendor/assets/javascripts/greensock/utils/Draggable.js +52 -35
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1519fc0c0e8a1166f4d252499402bc47f9c854d3
|
4
|
+
data.tar.gz: 1c243c5dbba750ca2c5fda1dff4481dba2ce2d82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b487d4140935756cac528dc659900010880df48c35879c567ae7baef9cc517243de0be8828de7f20530ec43651c9fb2c7aeaaa418c76b679439d6a557340d69
|
7
|
+
data.tar.gz: 98773e1f36a09a5ebb957a3c14f012866d02a826322d8078226190f8d06f1b08858d0a9e4c71cca811b6e5c44073f07a8842224b4b0563fbb516777e662e24f7
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.18.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 1.18.3
|
3
|
+
* DATE: 2016-04-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
|
@@ -69,7 +69,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
69
69
|
},
|
70
70
|
p = TimelineLite.prototype = new SimpleTimeline();
|
71
71
|
|
72
|
-
TimelineLite.version = "1.18.
|
72
|
+
TimelineLite.version = "1.18.3";
|
73
73
|
p.constructor = TimelineLite;
|
74
74
|
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
75
75
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.18.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 1.18.3
|
3
|
+
* DATE: 2016-04-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
|
@@ -33,7 +33,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
33
33
|
|
34
34
|
p.constructor = TimelineMax;
|
35
35
|
p.kill()._gc = false;
|
36
|
-
TimelineMax.version = "1.18.
|
36
|
+
TimelineMax.version = "1.18.3";
|
37
37
|
|
38
38
|
p.invalidate = function() {
|
39
39
|
this._yoyo = (this.vars.yoyo === true);
|
@@ -183,7 +183,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
183
183
|
if (this._repeat !== 0) {
|
184
184
|
cycleDuration = dur + this._repeatDelay;
|
185
185
|
this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but it gets reported as 0.79999999!)
|
186
|
-
if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration) {
|
186
|
+
if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration && prevTotalTime <= time) {
|
187
187
|
this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)
|
188
188
|
}
|
189
189
|
this._time = this._totalTime - (this._cycle * cycleDuration);
|
@@ -573,7 +573,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
573
573
|
},
|
574
574
|
p = TimelineLite.prototype = new SimpleTimeline();
|
575
575
|
|
576
|
-
TimelineLite.version = "1.18.
|
576
|
+
TimelineLite.version = "1.18.3";
|
577
577
|
p.constructor = TimelineLite;
|
578
578
|
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
579
579
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.18.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 1.18.3
|
3
|
+
* DATE: 2016-04-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
|
@@ -897,7 +897,7 @@
|
|
897
897
|
}
|
898
898
|
if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) {
|
899
899
|
this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
|
900
|
-
this.render(-this._delay);
|
900
|
+
this.render(Math.min(0, -this._delay)); //in case delay is negative
|
901
901
|
}
|
902
902
|
}, true),
|
903
903
|
_isSelector = function(v) {
|
@@ -925,7 +925,7 @@
|
|
925
925
|
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
926
926
|
p._notifyPluginsOfEnabled = p._lazy = false;
|
927
927
|
|
928
|
-
TweenLite.version = "1.18.
|
928
|
+
TweenLite.version = "1.18.3";
|
929
929
|
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
930
930
|
TweenLite.defaultOverwrite = "auto";
|
931
931
|
TweenLite.ticker = _ticker;
|
@@ -1513,7 +1513,7 @@
|
|
1513
1513
|
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.
|
1514
1514
|
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.
|
1515
1515
|
}
|
1516
|
-
if (!suppressEvents) if (this._time !== prevTime || isComplete) {
|
1516
|
+
if (!suppressEvents) if (this._time !== prevTime || isComplete || force) {
|
1517
1517
|
this._callback("onUpdate");
|
1518
1518
|
}
|
1519
1519
|
}
|
@@ -1637,7 +1637,7 @@
|
|
1637
1637
|
Animation.prototype.invalidate.call(this);
|
1638
1638
|
if (this.vars.immediateRender) {
|
1639
1639
|
this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
|
1640
|
-
this.render(-this._delay);
|
1640
|
+
this.render(Math.min(0, -this._delay)); //in case delay is negative.
|
1641
1641
|
}
|
1642
1642
|
return this;
|
1643
1643
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.18.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 1.18.3
|
3
|
+
* DATE: 2016-04-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
|
@@ -50,7 +50,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
50
50
|
p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
|
51
51
|
_blankArray = [];
|
52
52
|
|
53
|
-
TweenMax.version = "1.18.
|
53
|
+
TweenMax.version = "1.18.3";
|
54
54
|
p.constructor = TweenMax;
|
55
55
|
p.kill()._gc = false;
|
56
56
|
TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
|
@@ -180,11 +180,10 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
180
180
|
}
|
181
181
|
} else {
|
182
182
|
this._totalTime = this._time = time;
|
183
|
-
|
184
183
|
if (this._repeat !== 0) {
|
185
184
|
cycleDuration = duration + this._repeatDelay;
|
186
|
-
this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but
|
187
|
-
if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration) {
|
185
|
+
this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)
|
186
|
+
if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration && prevTotalTime <= time) {
|
188
187
|
this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)
|
189
188
|
}
|
190
189
|
this._time = this._totalTime - (this._cycle * cycleDuration);
|
@@ -297,7 +296,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
297
296
|
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.
|
298
297
|
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.
|
299
298
|
}
|
300
|
-
if (!suppressEvents) if (this._totalTime !== prevTotalTime ||
|
299
|
+
if (!suppressEvents) if (this._totalTime !== prevTotalTime || callback) {
|
301
300
|
this._callback("onUpdate");
|
302
301
|
}
|
303
302
|
}
|
@@ -543,12 +542,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
543
542
|
|
544
543
|
//---- GETTERS / SETTERS ----------------------------------------------------------------------------------------------------------
|
545
544
|
|
546
|
-
p.progress = function(value) {
|
547
|
-
return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)),
|
545
|
+
p.progress = function(value, suppressEvents) {
|
546
|
+
return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents);
|
548
547
|
};
|
549
548
|
|
550
|
-
p.totalProgress = function(value) {
|
551
|
-
return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value,
|
549
|
+
p.totalProgress = function(value, suppressEvents) {
|
550
|
+
return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, suppressEvents);
|
552
551
|
};
|
553
552
|
|
554
553
|
p.time = function(value, suppressEvents) {
|
@@ -684,7 +683,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
684
683
|
},
|
685
684
|
p = TimelineLite.prototype = new SimpleTimeline();
|
686
685
|
|
687
|
-
TimelineLite.version = "1.18.
|
686
|
+
TimelineLite.version = "1.18.3";
|
688
687
|
p.constructor = TimelineLite;
|
689
688
|
p.kill()._gc = p._forcingPlayhead = p._hasPause = false;
|
690
689
|
|
@@ -1410,7 +1409,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1410
1409
|
|
1411
1410
|
p.constructor = TimelineMax;
|
1412
1411
|
p.kill()._gc = false;
|
1413
|
-
TimelineMax.version = "1.18.
|
1412
|
+
TimelineMax.version = "1.18.3";
|
1414
1413
|
|
1415
1414
|
p.invalidate = function() {
|
1416
1415
|
this._yoyo = (this.vars.yoyo === true);
|
@@ -1560,7 +1559,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1560
1559
|
if (this._repeat !== 0) {
|
1561
1560
|
cycleDuration = dur + this._repeatDelay;
|
1562
1561
|
this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but it gets reported as 0.79999999!)
|
1563
|
-
if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration) {
|
1562
|
+
if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration && prevTotalTime <= time) {
|
1564
1563
|
this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)
|
1565
1564
|
}
|
1566
1565
|
this._time = this._totalTime - (this._cycle * cycleDuration);
|
@@ -2044,7 +2043,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2044
2043
|
i = props.length;
|
2045
2044
|
while (--i > -1) {
|
2046
2045
|
p = props[i];
|
2047
|
-
if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors.
|
2046
|
+
if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors.
|
2048
2047
|
seamless = false;
|
2049
2048
|
break;
|
2050
2049
|
}
|
@@ -2077,7 +2076,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2077
2076
|
a = obj[props[i]];
|
2078
2077
|
l = a.length - 1;
|
2079
2078
|
for (j = 0; j < l; j++) {
|
2080
|
-
r = a[j+1].da / _r2[j] + a[j].da / _r1[j];
|
2079
|
+
r = (a[j+1].da / _r2[j] + a[j].da / _r1[j]) || 0;
|
2081
2080
|
_r3[j] = (_r3[j] || 0) + r * r;
|
2082
2081
|
}
|
2083
2082
|
}
|
@@ -2195,7 +2194,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2195
2194
|
BezierPlugin = _gsScope._gsDefine.plugin({
|
2196
2195
|
propName: "bezier",
|
2197
2196
|
priority: -1,
|
2198
|
-
version: "1.3.
|
2197
|
+
version: "1.3.5",
|
2199
2198
|
API: 2,
|
2200
2199
|
global:true,
|
2201
2200
|
|
@@ -2258,7 +2257,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2258
2257
|
this._func[p] = (typeof(target[p]) === "function") ? target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ] : false;
|
2259
2258
|
}
|
2260
2259
|
p = autoRotate[i][2];
|
2261
|
-
this._initialRotations[i] = this._func[p] ? this._func[p].call(this._target) : this._target[p];
|
2260
|
+
this._initialRotations[i] = (this._func[p] ? this._func[p].call(this._target) : this._target[p]) || 0;
|
2262
2261
|
}
|
2263
2262
|
}
|
2264
2263
|
this._startRatio = tween.vars.runBackwards ? 1 : 0; //we determine the starting ratio when the tween inits which is always 0 unless the tween has runBackwards:true (indicating it's a from() tween) in which case it's 1.
|
@@ -2320,7 +2319,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2320
2319
|
this._s2 = curSeg[i];
|
2321
2320
|
this._si = i;
|
2322
2321
|
}
|
2323
|
-
t = (i + (v - this._s1) / (this._s2 - this._s1)) * this._prec;
|
2322
|
+
t = ((i + (v - this._s1) / (this._s2 - this._s1)) * this._prec) || 0;
|
2324
2323
|
}
|
2325
2324
|
inv = 1 - t;
|
2326
2325
|
|
@@ -2503,7 +2502,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2503
2502
|
p = CSSPlugin.prototype = new TweenPlugin("css");
|
2504
2503
|
|
2505
2504
|
p.constructor = CSSPlugin;
|
2506
|
-
CSSPlugin.version = "1.18.
|
2505
|
+
CSSPlugin.version = "1.18.3";
|
2507
2506
|
CSSPlugin.API = 2;
|
2508
2507
|
CSSPlugin.defaultTransformPerspective = 0;
|
2509
2508
|
CSSPlugin.defaultSkewType = "compensated";
|
@@ -2512,7 +2511,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2512
2511
|
CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""};
|
2513
2512
|
|
2514
2513
|
|
2515
|
-
var _numExp = /(
|
2514
|
+
var _numExp = /(?:\-|\.|\b)[\d\.e]+\b/g,
|
2516
2515
|
_relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,
|
2517
2516
|
_valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
|
2518
2517
|
_NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and +=
|
@@ -2529,6 +2528,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2529
2528
|
_ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi,
|
2530
2529
|
_ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,
|
2531
2530
|
_commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis
|
2531
|
+
_complexExp = /[\s,\(]/i, //for testing a string to find if it has a space, comma, or open parenthesis (clues that it's a complex value)
|
2532
2532
|
_DEG2RAD = Math.PI / 180,
|
2533
2533
|
_RAD2DEG = 180 / Math.PI,
|
2534
2534
|
_forcePT = {},
|
@@ -2780,7 +2780,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2780
2780
|
}
|
2781
2781
|
var a = v.split(" "),
|
2782
2782
|
x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],
|
2783
|
-
y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1]
|
2783
|
+
y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1],
|
2784
|
+
i;
|
2785
|
+
if (a.length > 3 && !recObj) { //multiple positions
|
2786
|
+
a = v.split(", ").join(",").split(",");
|
2787
|
+
v = [];
|
2788
|
+
for (i = 0; i < a.length; i++) {
|
2789
|
+
v.push(_parsePosition(a[i]));
|
2790
|
+
}
|
2791
|
+
return v.join(",");
|
2792
|
+
}
|
2784
2793
|
if (y == null) {
|
2785
2794
|
y = (x === "center") ? "50%" : "0";
|
2786
2795
|
} else if (y === "center") {
|
@@ -2809,7 +2818,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2809
2818
|
* @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized)
|
2810
2819
|
*/
|
2811
2820
|
_parseChange = function(e, b) {
|
2812
|
-
return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : parseFloat(e) - parseFloat(b);
|
2821
|
+
return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : (parseFloat(e) - parseFloat(b)) || 0;
|
2813
2822
|
},
|
2814
2823
|
|
2815
2824
|
/**
|
@@ -2819,7 +2828,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2819
2828
|
* @return {number} Parsed value
|
2820
2829
|
*/
|
2821
2830
|
_parseVal = function(v, d) {
|
2822
|
-
return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v);
|
2831
|
+
return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v) || 0;
|
2823
2832
|
},
|
2824
2833
|
|
2825
2834
|
/**
|
@@ -2982,7 +2991,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2982
2991
|
}
|
2983
2992
|
parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")";
|
2984
2993
|
}
|
2985
|
-
return parsed;
|
2994
|
+
return parsed + s.substr(charIndex);
|
2986
2995
|
},
|
2987
2996
|
_colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
|
2988
2997
|
|
@@ -2994,12 +3003,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2994
3003
|
CSSPlugin.colorStringFilter = function(a) {
|
2995
3004
|
var combined = a[0] + a[1],
|
2996
3005
|
toHSL;
|
2997
|
-
_colorExp.lastIndex = 0;
|
2998
3006
|
if (_colorExp.test(combined)) {
|
2999
3007
|
toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1);
|
3000
3008
|
a[0] = _formatColors(a[0], toHSL);
|
3001
3009
|
a[1] = _formatColors(a[1], toHSL);
|
3002
3010
|
}
|
3011
|
+
_colorExp.lastIndex = 0;
|
3003
3012
|
};
|
3004
3013
|
|
3005
3014
|
if (!TweenLite.defaultStringFilter) {
|
@@ -3292,6 +3301,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3292
3301
|
b = b || dflt || "";
|
3293
3302
|
pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e);
|
3294
3303
|
e += ""; //ensures it's a string
|
3304
|
+
if (clrs && _colorExp.test(e + b)) { //if colors are found, normalize the formatting to rgba() or hsla().
|
3305
|
+
e = [b, e];
|
3306
|
+
CSSPlugin.colorStringFilter(e);
|
3307
|
+
b = e[0];
|
3308
|
+
e = e[1];
|
3309
|
+
}
|
3295
3310
|
var ba = b.split(", ").join(",").split(" "), //beginning array
|
3296
3311
|
ea = e.split(", ").join(",").split(" "), //ending array
|
3297
3312
|
l = ba.length,
|
@@ -3320,7 +3335,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3320
3335
|
|
3321
3336
|
//if the value is a color
|
3322
3337
|
} else if (clrs && _colorExp.test(bv)) {
|
3323
|
-
str = ev.
|
3338
|
+
str = ev.indexOf(")") + 1;
|
3339
|
+
str = ")" + (str ? ev.substr(str) : ""); //if there's a comma or ) at the end, retain it.
|
3324
3340
|
useHSL = (ev.indexOf("hsl") !== -1 && _supportsOpacity);
|
3325
3341
|
bv = _parseColor(bv, useHSL);
|
3326
3342
|
ev = _parseColor(ev, useHSL);
|
@@ -3354,7 +3370,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3354
3370
|
|
3355
3371
|
//if no number is found, treat it as a non-tweening value and just append the string to the current xs.
|
3356
3372
|
if (!bnums) {
|
3357
|
-
pt["xs" + pt.l] += pt.l ? " " + ev : ev;
|
3373
|
+
pt["xs" + pt.l] += (pt.l || pt["xs" + pt.l]) ? " " + ev : ev;
|
3358
3374
|
|
3359
3375
|
//loop through all the numbers that are found and construct the extra values on the pt.
|
3360
3376
|
} else {
|
@@ -3648,7 +3664,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3648
3664
|
}
|
3649
3665
|
return force;
|
3650
3666
|
})(),
|
3651
|
-
_parseSVGOrigin = function(e, local, decoratee, absolute, smoothOrigin) {
|
3667
|
+
_parseSVGOrigin = function(e, local, decoratee, absolute, smoothOrigin, skipRecord) {
|
3652
3668
|
var tm = e._gsTransform,
|
3653
3669
|
m = _getMatrix(e, true),
|
3654
3670
|
v, x, y, xOrigin, yOrigin, a, b, c, d, tx, ty, determinant, xOriginOld, yOriginOld;
|
@@ -3678,6 +3694,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3678
3694
|
yOrigin = decoratee.yOrigin = v[1] = y;
|
3679
3695
|
}
|
3680
3696
|
if (tm) { //avoid jump when transformOrigin is changed - adjust the x/y values accordingly
|
3697
|
+
if (skipRecord) {
|
3698
|
+
decoratee.xOffset = tm.xOffset;
|
3699
|
+
decoratee.yOffset = tm.yOffset;
|
3700
|
+
tm = decoratee;
|
3701
|
+
}
|
3681
3702
|
if (smoothOrigin || (smoothOrigin !== false && CSSPlugin.defaultSmoothOrigin !== false)) {
|
3682
3703
|
x = xOrigin - xOriginOld;
|
3683
3704
|
y = yOrigin - yOriginOld;
|
@@ -3690,10 +3711,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3690
3711
|
tm.xOffset = tm.yOffset = 0;
|
3691
3712
|
}
|
3692
3713
|
}
|
3693
|
-
|
3714
|
+
if (!skipRecord) {
|
3715
|
+
e.setAttribute("data-svg-origin", v.join(" "));
|
3716
|
+
}
|
3694
3717
|
},
|
3695
|
-
|
3696
|
-
|
3718
|
+
_canGetBBox = function(e) {
|
3719
|
+
try {
|
3720
|
+
return e.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a <symbol> or <defs>). https://bugzilla.mozilla.org/show_bug.cgi?id=612118
|
3721
|
+
} catch (e) {}
|
3722
|
+
},
|
3723
|
+
_isSVG = function(e) { //reports if the element is an SVG on which getBBox() actually works
|
3724
|
+
return !!(_SVGElement && e.getBBox && e.getCTM && _canGetBBox(e));
|
3697
3725
|
},
|
3698
3726
|
_identity2DMatrix = [1,0,0,1,0,0],
|
3699
3727
|
_getMatrix = function(e, force2D) {
|
@@ -3728,7 +3756,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3728
3756
|
return _identity2DMatrix;
|
3729
3757
|
}
|
3730
3758
|
//split the matrix values out into an array (m for matrix)
|
3731
|
-
m = (s || "").match(
|
3759
|
+
m = (s || "").match(_numExp) || [];
|
3732
3760
|
i = m.length;
|
3733
3761
|
while (--i > -1) {
|
3734
3762
|
n = Number(m[i]);
|
@@ -3835,7 +3863,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
3835
3863
|
tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21) * rnd + 0.5) | 0) / rnd;
|
3836
3864
|
tm.scaleY = ((Math.sqrt(a22 * a22 + a23 * a23) * rnd + 0.5) | 0) / rnd;
|
3837
3865
|
tm.scaleZ = ((Math.sqrt(a32 * a32 + a33 * a33) * rnd + 0.5) | 0) / rnd;
|
3838
|
-
tm.skewX = 0;
|
3866
|
+
tm.skewX = (a12 || a22) ? Math.atan2(a12, a22) * _RAD2DEG + tm.rotation : tm.skewX || 0;
|
3867
|
+
if (Math.abs(tm.skewX) > 90 && Math.abs(tm.skewX) < 270) {
|
3868
|
+
if (invX) {
|
3869
|
+
tm.scaleX *= -1;
|
3870
|
+
tm.skewX += (tm.rotation <= 0) ? 180 : -180;
|
3871
|
+
tm.rotation += (tm.rotation <= 0) ? 180 : -180;
|
3872
|
+
} else {
|
3873
|
+
tm.scaleY *= -1;
|
3874
|
+
tm.skewX += (tm.skewX <= 0) ? 180 : -180;
|
3875
|
+
}
|
3876
|
+
}
|
3839
3877
|
tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0;
|
3840
3878
|
tm.x = a14;
|
3841
3879
|
tm.y = a24;
|
@@ -4227,7 +4265,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4227
4265
|
v = vars,
|
4228
4266
|
endRotations = {},
|
4229
4267
|
transformOriginString = "transformOrigin",
|
4230
|
-
m1, m2,
|
4268
|
+
m1, m2, copy, orig, has3D, hasChange, dr, x, y, matrix;
|
4231
4269
|
if (vars.display) { //if the user is setting display during this tween, it may not be instantiated yet but we must force it here in order to get accurate readings. If display is "none", some browsers refuse to report the transform properties correctly.
|
4232
4270
|
copy = _getStyle(t, "display");
|
4233
4271
|
style.display = "block";
|
@@ -4244,6 +4282,25 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4244
4282
|
copy.position = "absolute";
|
4245
4283
|
_doc.body.appendChild(_tempDiv);
|
4246
4284
|
m2 = _getTransform(_tempDiv, null, false);
|
4285
|
+
if (m1.svg) { //if it's an SVG element, x/y part of the matrix will be affected by whatever we use as the origin and the offsets, so compensate here...
|
4286
|
+
x = m1.xOrigin;
|
4287
|
+
y = m1.yOrigin;
|
4288
|
+
m2.x -= m1.xOffset;
|
4289
|
+
m2.y -= m1.yOffset;
|
4290
|
+
if (v.transformOrigin || v.svgOrigin) { //if this tween is altering the origin, we must factor that in here. The actual work of recording the transformOrigin values and setting up the PropTween is done later (still inside this function) so we cannot leave the changes intact here - we only want to update the x/y accordingly.
|
4291
|
+
orig = {};
|
4292
|
+
_parseSVGOrigin(t, _parsePosition(v.transformOrigin), orig, v.svgOrigin, v.smoothOrigin, true);
|
4293
|
+
x = orig.xOrigin;
|
4294
|
+
y = orig.yOrigin;
|
4295
|
+
m2.x -= orig.xOffset - m1.xOffset;
|
4296
|
+
m2.y -= orig.yOffset - m1.yOffset;
|
4297
|
+
}
|
4298
|
+
if (x || y) {
|
4299
|
+
matrix = _getMatrix(_tempDiv);
|
4300
|
+
m2.x -= x - (x * matrix[0] + y * matrix[2]);
|
4301
|
+
m2.y -= y - (x * matrix[1] + y * matrix[3]);
|
4302
|
+
}
|
4303
|
+
}
|
4247
4304
|
_doc.body.removeChild(_tempDiv);
|
4248
4305
|
if (!m2.perspective) {
|
4249
4306
|
m2.perspective = m1.perspective; //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case.
|
@@ -4283,18 +4340,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4283
4340
|
m2.yPercent = _parseVal(v.y, m1.yPercent);
|
4284
4341
|
}
|
4285
4342
|
|
4286
|
-
m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation, m1.rotation, "rotation", endRotations);
|
4343
|
+
m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation - m1.skewY, m1.rotation - m1.skewY, "rotation", endRotations); //see notes below about skewY for why we subtract it from rotation here
|
4287
4344
|
if (_supports3D) {
|
4288
4345
|
m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations);
|
4289
4346
|
m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations);
|
4290
4347
|
}
|
4291
|
-
m2.skewX = (v.skewX
|
4348
|
+
m2.skewX = _parseAngle(v.skewX, m1.skewX - m1.skewY); //see notes below about skewY and why we subtract it from skewX here
|
4292
4349
|
|
4293
4350
|
//note: for performance reasons, we combine all skewing into the skewX and rotation values, ignoring skewY but we must still record it so that we can discern how much of the overall skew is attributed to skewX vs. skewY. Otherwise, if the skewY would always act relative (tween skewY to 10deg, for example, multiple times and if we always combine things into skewX, we can't remember that skewY was 10 from last time). Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of -10 degrees.
|
4294
|
-
m2.skewY =
|
4295
|
-
|
4296
|
-
m2.
|
4297
|
-
m2.rotation += skewY;
|
4351
|
+
if ((m2.skewY = _parseAngle(v.skewY, m1.skewY))) {
|
4352
|
+
m2.skewX += m2.skewY;
|
4353
|
+
m2.rotation += m2.skewY;
|
4298
4354
|
}
|
4299
4355
|
}
|
4300
4356
|
if (_supports3D && v.force3D != null) {
|
@@ -4433,7 +4489,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4433
4489
|
bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase
|
4434
4490
|
es = this.format(e),
|
4435
4491
|
ba, ea, i, pct, overlap, src;
|
4436
|
-
if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1)) {
|
4492
|
+
if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1) && es.split(",").length < 2) {
|
4437
4493
|
src = _getStyle(t, "backgroundImage").replace(_urlExp, "");
|
4438
4494
|
if (src && src !== "none") {
|
4439
4495
|
ba = bs.split(" ");
|
@@ -4605,7 +4661,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4605
4661
|
cnpt.setRatio(1);
|
4606
4662
|
}
|
4607
4663
|
t._gsClassPT = pt;
|
4608
|
-
pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("
|
4664
|
+
pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("(?:\\s|^)" + e.substr(2) + "(?![\\w-])"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : "");
|
4609
4665
|
t.setAttribute("class", pt.e);
|
4610
4666
|
difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);
|
4611
4667
|
t.setAttribute("class", b);
|
@@ -4800,7 +4856,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
4800
4856
|
}
|
4801
4857
|
pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin);
|
4802
4858
|
|
4803
|
-
} else if (isStr &&
|
4859
|
+
} else if (isStr && _complexExp.test(es)) {
|
4804
4860
|
pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin);
|
4805
4861
|
|
4806
4862
|
} else {
|
@@ -6590,7 +6646,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6590
6646
|
}
|
6591
6647
|
if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) {
|
6592
6648
|
this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
|
6593
|
-
this.render(-this._delay);
|
6649
|
+
this.render(Math.min(0, -this._delay)); //in case delay is negative
|
6594
6650
|
}
|
6595
6651
|
}, true),
|
6596
6652
|
_isSelector = function(v) {
|
@@ -6618,7 +6674,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
6618
6674
|
p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
|
6619
6675
|
p._notifyPluginsOfEnabled = p._lazy = false;
|
6620
6676
|
|
6621
|
-
TweenLite.version = "1.18.
|
6677
|
+
TweenLite.version = "1.18.3";
|
6622
6678
|
TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
|
6623
6679
|
TweenLite.defaultOverwrite = "auto";
|
6624
6680
|
TweenLite.ticker = _ticker;
|
@@ -7206,7 +7262,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
7206
7262
|
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.
|
7207
7263
|
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.
|
7208
7264
|
}
|
7209
|
-
if (!suppressEvents) if (this._time !== prevTime || isComplete) {
|
7265
|
+
if (!suppressEvents) if (this._time !== prevTime || isComplete || force) {
|
7210
7266
|
this._callback("onUpdate");
|
7211
7267
|
}
|
7212
7268
|
}
|
@@ -7330,7 +7386,7 @@ if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); } //necessary in case Tween
|
|
7330
7386
|
Animation.prototype.invalidate.call(this);
|
7331
7387
|
if (this.vars.immediateRender) {
|
7332
7388
|
this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
|
7333
|
-
this.render(-this._delay);
|
7389
|
+
this.render(Math.min(0, -this._delay)); //in case delay is negative.
|
7334
7390
|
}
|
7335
7391
|
return this;
|
7336
7392
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: beta 1.3.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: beta 1.3.5
|
3
|
+
* DATE: 2016-04-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
|
@@ -157,7 +157,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
157
157
|
i = props.length;
|
158
158
|
while (--i > -1) {
|
159
159
|
p = props[i];
|
160
|
-
if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors.
|
160
|
+
if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors.
|
161
161
|
seamless = false;
|
162
162
|
break;
|
163
163
|
}
|
@@ -190,7 +190,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
190
190
|
a = obj[props[i]];
|
191
191
|
l = a.length - 1;
|
192
192
|
for (j = 0; j < l; j++) {
|
193
|
-
r = a[j+1].da / _r2[j] + a[j].da / _r1[j];
|
193
|
+
r = (a[j+1].da / _r2[j] + a[j].da / _r1[j]) || 0;
|
194
194
|
_r3[j] = (_r3[j] || 0) + r * r;
|
195
195
|
}
|
196
196
|
}
|
@@ -308,7 +308,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
308
308
|
BezierPlugin = _gsScope._gsDefine.plugin({
|
309
309
|
propName: "bezier",
|
310
310
|
priority: -1,
|
311
|
-
version: "1.3.
|
311
|
+
version: "1.3.5",
|
312
312
|
API: 2,
|
313
313
|
global:true,
|
314
314
|
|
@@ -371,7 +371,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
371
371
|
this._func[p] = (typeof(target[p]) === "function") ? target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ] : false;
|
372
372
|
}
|
373
373
|
p = autoRotate[i][2];
|
374
|
-
this._initialRotations[i] = this._func[p] ? this._func[p].call(this._target) : this._target[p];
|
374
|
+
this._initialRotations[i] = (this._func[p] ? this._func[p].call(this._target) : this._target[p]) || 0;
|
375
375
|
}
|
376
376
|
}
|
377
377
|
this._startRatio = tween.vars.runBackwards ? 1 : 0; //we determine the starting ratio when the tween inits which is always 0 unless the tween has runBackwards:true (indicating it's a from() tween) in which case it's 1.
|
@@ -433,7 +433,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
433
433
|
this._s2 = curSeg[i];
|
434
434
|
this._si = i;
|
435
435
|
}
|
436
|
-
t = (i + (v - this._s1) / (this._s2 - this._s1)) * this._prec;
|
436
|
+
t = ((i + (v - this._s1) / (this._s2 - this._s1)) * this._prec) || 0;
|
437
437
|
}
|
438
438
|
inv = 1 - t;
|
439
439
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 1.18.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 1.18.3
|
3
|
+
* DATE: 2016-04-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
|
@@ -31,7 +31,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
31
31
|
p = CSSPlugin.prototype = new TweenPlugin("css");
|
32
32
|
|
33
33
|
p.constructor = CSSPlugin;
|
34
|
-
CSSPlugin.version = "1.18.
|
34
|
+
CSSPlugin.version = "1.18.3";
|
35
35
|
CSSPlugin.API = 2;
|
36
36
|
CSSPlugin.defaultTransformPerspective = 0;
|
37
37
|
CSSPlugin.defaultSkewType = "compensated";
|
@@ -40,7 +40,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
40
40
|
CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""};
|
41
41
|
|
42
42
|
|
43
|
-
var _numExp = /(
|
43
|
+
var _numExp = /(?:\-|\.|\b)[\d\.e]+\b/g,
|
44
44
|
_relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,
|
45
45
|
_valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
|
46
46
|
_NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and +=
|
@@ -57,6 +57,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
57
57
|
_ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi,
|
58
58
|
_ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,
|
59
59
|
_commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis
|
60
|
+
_complexExp = /[\s,\(]/i, //for testing a string to find if it has a space, comma, or open parenthesis (clues that it's a complex value)
|
60
61
|
_DEG2RAD = Math.PI / 180,
|
61
62
|
_RAD2DEG = 180 / Math.PI,
|
62
63
|
_forcePT = {},
|
@@ -308,7 +309,16 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
308
309
|
}
|
309
310
|
var a = v.split(" "),
|
310
311
|
x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],
|
311
|
-
y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1]
|
312
|
+
y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1],
|
313
|
+
i;
|
314
|
+
if (a.length > 3 && !recObj) { //multiple positions
|
315
|
+
a = v.split(", ").join(",").split(",");
|
316
|
+
v = [];
|
317
|
+
for (i = 0; i < a.length; i++) {
|
318
|
+
v.push(_parsePosition(a[i]));
|
319
|
+
}
|
320
|
+
return v.join(",");
|
321
|
+
}
|
312
322
|
if (y == null) {
|
313
323
|
y = (x === "center") ? "50%" : "0";
|
314
324
|
} else if (y === "center") {
|
@@ -337,7 +347,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
337
347
|
* @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized)
|
338
348
|
*/
|
339
349
|
_parseChange = function(e, b) {
|
340
|
-
return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : parseFloat(e) - parseFloat(b);
|
350
|
+
return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : (parseFloat(e) - parseFloat(b)) || 0;
|
341
351
|
},
|
342
352
|
|
343
353
|
/**
|
@@ -347,7 +357,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
347
357
|
* @return {number} Parsed value
|
348
358
|
*/
|
349
359
|
_parseVal = function(v, d) {
|
350
|
-
return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v);
|
360
|
+
return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v) || 0;
|
351
361
|
},
|
352
362
|
|
353
363
|
/**
|
@@ -510,7 +520,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
510
520
|
}
|
511
521
|
parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")";
|
512
522
|
}
|
513
|
-
return parsed;
|
523
|
+
return parsed + s.substr(charIndex);
|
514
524
|
},
|
515
525
|
_colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
|
516
526
|
|
@@ -522,12 +532,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
522
532
|
CSSPlugin.colorStringFilter = function(a) {
|
523
533
|
var combined = a[0] + a[1],
|
524
534
|
toHSL;
|
525
|
-
_colorExp.lastIndex = 0;
|
526
535
|
if (_colorExp.test(combined)) {
|
527
536
|
toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1);
|
528
537
|
a[0] = _formatColors(a[0], toHSL);
|
529
538
|
a[1] = _formatColors(a[1], toHSL);
|
530
539
|
}
|
540
|
+
_colorExp.lastIndex = 0;
|
531
541
|
};
|
532
542
|
|
533
543
|
if (!TweenLite.defaultStringFilter) {
|
@@ -820,6 +830,12 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
820
830
|
b = b || dflt || "";
|
821
831
|
pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e);
|
822
832
|
e += ""; //ensures it's a string
|
833
|
+
if (clrs && _colorExp.test(e + b)) { //if colors are found, normalize the formatting to rgba() or hsla().
|
834
|
+
e = [b, e];
|
835
|
+
CSSPlugin.colorStringFilter(e);
|
836
|
+
b = e[0];
|
837
|
+
e = e[1];
|
838
|
+
}
|
823
839
|
var ba = b.split(", ").join(",").split(" "), //beginning array
|
824
840
|
ea = e.split(", ").join(",").split(" "), //ending array
|
825
841
|
l = ba.length,
|
@@ -848,7 +864,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
848
864
|
|
849
865
|
//if the value is a color
|
850
866
|
} else if (clrs && _colorExp.test(bv)) {
|
851
|
-
str = ev.
|
867
|
+
str = ev.indexOf(")") + 1;
|
868
|
+
str = ")" + (str ? ev.substr(str) : ""); //if there's a comma or ) at the end, retain it.
|
852
869
|
useHSL = (ev.indexOf("hsl") !== -1 && _supportsOpacity);
|
853
870
|
bv = _parseColor(bv, useHSL);
|
854
871
|
ev = _parseColor(ev, useHSL);
|
@@ -882,7 +899,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
882
899
|
|
883
900
|
//if no number is found, treat it as a non-tweening value and just append the string to the current xs.
|
884
901
|
if (!bnums) {
|
885
|
-
pt["xs" + pt.l] += pt.l ? " " + ev : ev;
|
902
|
+
pt["xs" + pt.l] += (pt.l || pt["xs" + pt.l]) ? " " + ev : ev;
|
886
903
|
|
887
904
|
//loop through all the numbers that are found and construct the extra values on the pt.
|
888
905
|
} else {
|
@@ -1176,7 +1193,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1176
1193
|
}
|
1177
1194
|
return force;
|
1178
1195
|
})(),
|
1179
|
-
_parseSVGOrigin = function(e, local, decoratee, absolute, smoothOrigin) {
|
1196
|
+
_parseSVGOrigin = function(e, local, decoratee, absolute, smoothOrigin, skipRecord) {
|
1180
1197
|
var tm = e._gsTransform,
|
1181
1198
|
m = _getMatrix(e, true),
|
1182
1199
|
v, x, y, xOrigin, yOrigin, a, b, c, d, tx, ty, determinant, xOriginOld, yOriginOld;
|
@@ -1206,6 +1223,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1206
1223
|
yOrigin = decoratee.yOrigin = v[1] = y;
|
1207
1224
|
}
|
1208
1225
|
if (tm) { //avoid jump when transformOrigin is changed - adjust the x/y values accordingly
|
1226
|
+
if (skipRecord) {
|
1227
|
+
decoratee.xOffset = tm.xOffset;
|
1228
|
+
decoratee.yOffset = tm.yOffset;
|
1229
|
+
tm = decoratee;
|
1230
|
+
}
|
1209
1231
|
if (smoothOrigin || (smoothOrigin !== false && CSSPlugin.defaultSmoothOrigin !== false)) {
|
1210
1232
|
x = xOrigin - xOriginOld;
|
1211
1233
|
y = yOrigin - yOriginOld;
|
@@ -1218,10 +1240,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1218
1240
|
tm.xOffset = tm.yOffset = 0;
|
1219
1241
|
}
|
1220
1242
|
}
|
1221
|
-
|
1243
|
+
if (!skipRecord) {
|
1244
|
+
e.setAttribute("data-svg-origin", v.join(" "));
|
1245
|
+
}
|
1222
1246
|
},
|
1223
|
-
|
1224
|
-
|
1247
|
+
_canGetBBox = function(e) {
|
1248
|
+
try {
|
1249
|
+
return e.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a <symbol> or <defs>). https://bugzilla.mozilla.org/show_bug.cgi?id=612118
|
1250
|
+
} catch (e) {}
|
1251
|
+
},
|
1252
|
+
_isSVG = function(e) { //reports if the element is an SVG on which getBBox() actually works
|
1253
|
+
return !!(_SVGElement && e.getBBox && e.getCTM && _canGetBBox(e));
|
1225
1254
|
},
|
1226
1255
|
_identity2DMatrix = [1,0,0,1,0,0],
|
1227
1256
|
_getMatrix = function(e, force2D) {
|
@@ -1256,7 +1285,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1256
1285
|
return _identity2DMatrix;
|
1257
1286
|
}
|
1258
1287
|
//split the matrix values out into an array (m for matrix)
|
1259
|
-
m = (s || "").match(
|
1288
|
+
m = (s || "").match(_numExp) || [];
|
1260
1289
|
i = m.length;
|
1261
1290
|
while (--i > -1) {
|
1262
1291
|
n = Number(m[i]);
|
@@ -1363,7 +1392,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1363
1392
|
tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21) * rnd + 0.5) | 0) / rnd;
|
1364
1393
|
tm.scaleY = ((Math.sqrt(a22 * a22 + a23 * a23) * rnd + 0.5) | 0) / rnd;
|
1365
1394
|
tm.scaleZ = ((Math.sqrt(a32 * a32 + a33 * a33) * rnd + 0.5) | 0) / rnd;
|
1366
|
-
tm.skewX = 0;
|
1395
|
+
tm.skewX = (a12 || a22) ? Math.atan2(a12, a22) * _RAD2DEG + tm.rotation : tm.skewX || 0;
|
1396
|
+
if (Math.abs(tm.skewX) > 90 && Math.abs(tm.skewX) < 270) {
|
1397
|
+
if (invX) {
|
1398
|
+
tm.scaleX *= -1;
|
1399
|
+
tm.skewX += (tm.rotation <= 0) ? 180 : -180;
|
1400
|
+
tm.rotation += (tm.rotation <= 0) ? 180 : -180;
|
1401
|
+
} else {
|
1402
|
+
tm.scaleY *= -1;
|
1403
|
+
tm.skewX += (tm.skewX <= 0) ? 180 : -180;
|
1404
|
+
}
|
1405
|
+
}
|
1367
1406
|
tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0;
|
1368
1407
|
tm.x = a14;
|
1369
1408
|
tm.y = a24;
|
@@ -1755,7 +1794,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1755
1794
|
v = vars,
|
1756
1795
|
endRotations = {},
|
1757
1796
|
transformOriginString = "transformOrigin",
|
1758
|
-
m1, m2,
|
1797
|
+
m1, m2, copy, orig, has3D, hasChange, dr, x, y, matrix;
|
1759
1798
|
if (vars.display) { //if the user is setting display during this tween, it may not be instantiated yet but we must force it here in order to get accurate readings. If display is "none", some browsers refuse to report the transform properties correctly.
|
1760
1799
|
copy = _getStyle(t, "display");
|
1761
1800
|
style.display = "block";
|
@@ -1772,6 +1811,25 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1772
1811
|
copy.position = "absolute";
|
1773
1812
|
_doc.body.appendChild(_tempDiv);
|
1774
1813
|
m2 = _getTransform(_tempDiv, null, false);
|
1814
|
+
if (m1.svg) { //if it's an SVG element, x/y part of the matrix will be affected by whatever we use as the origin and the offsets, so compensate here...
|
1815
|
+
x = m1.xOrigin;
|
1816
|
+
y = m1.yOrigin;
|
1817
|
+
m2.x -= m1.xOffset;
|
1818
|
+
m2.y -= m1.yOffset;
|
1819
|
+
if (v.transformOrigin || v.svgOrigin) { //if this tween is altering the origin, we must factor that in here. The actual work of recording the transformOrigin values and setting up the PropTween is done later (still inside this function) so we cannot leave the changes intact here - we only want to update the x/y accordingly.
|
1820
|
+
orig = {};
|
1821
|
+
_parseSVGOrigin(t, _parsePosition(v.transformOrigin), orig, v.svgOrigin, v.smoothOrigin, true);
|
1822
|
+
x = orig.xOrigin;
|
1823
|
+
y = orig.yOrigin;
|
1824
|
+
m2.x -= orig.xOffset - m1.xOffset;
|
1825
|
+
m2.y -= orig.yOffset - m1.yOffset;
|
1826
|
+
}
|
1827
|
+
if (x || y) {
|
1828
|
+
matrix = _getMatrix(_tempDiv);
|
1829
|
+
m2.x -= x - (x * matrix[0] + y * matrix[2]);
|
1830
|
+
m2.y -= y - (x * matrix[1] + y * matrix[3]);
|
1831
|
+
}
|
1832
|
+
}
|
1775
1833
|
_doc.body.removeChild(_tempDiv);
|
1776
1834
|
if (!m2.perspective) {
|
1777
1835
|
m2.perspective = m1.perspective; //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case.
|
@@ -1811,18 +1869,17 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1811
1869
|
m2.yPercent = _parseVal(v.y, m1.yPercent);
|
1812
1870
|
}
|
1813
1871
|
|
1814
|
-
m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation, m1.rotation, "rotation", endRotations);
|
1872
|
+
m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation - m1.skewY, m1.rotation - m1.skewY, "rotation", endRotations); //see notes below about skewY for why we subtract it from rotation here
|
1815
1873
|
if (_supports3D) {
|
1816
1874
|
m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations);
|
1817
1875
|
m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations);
|
1818
1876
|
}
|
1819
|
-
m2.skewX = (v.skewX
|
1877
|
+
m2.skewX = _parseAngle(v.skewX, m1.skewX - m1.skewY); //see notes below about skewY and why we subtract it from skewX here
|
1820
1878
|
|
1821
1879
|
//note: for performance reasons, we combine all skewing into the skewX and rotation values, ignoring skewY but we must still record it so that we can discern how much of the overall skew is attributed to skewX vs. skewY. Otherwise, if the skewY would always act relative (tween skewY to 10deg, for example, multiple times and if we always combine things into skewX, we can't remember that skewY was 10 from last time). Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of -10 degrees.
|
1822
|
-
m2.skewY =
|
1823
|
-
|
1824
|
-
m2.
|
1825
|
-
m2.rotation += skewY;
|
1880
|
+
if ((m2.skewY = _parseAngle(v.skewY, m1.skewY))) {
|
1881
|
+
m2.skewX += m2.skewY;
|
1882
|
+
m2.rotation += m2.skewY;
|
1826
1883
|
}
|
1827
1884
|
}
|
1828
1885
|
if (_supports3D && v.force3D != null) {
|
@@ -1961,7 +2018,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1961
2018
|
bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase
|
1962
2019
|
es = this.format(e),
|
1963
2020
|
ba, ea, i, pct, overlap, src;
|
1964
|
-
if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1)) {
|
2021
|
+
if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1) && es.split(",").length < 2) {
|
1965
2022
|
src = _getStyle(t, "backgroundImage").replace(_urlExp, "");
|
1966
2023
|
if (src && src !== "none") {
|
1967
2024
|
ba = bs.split(" ");
|
@@ -2133,7 +2190,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2133
2190
|
cnpt.setRatio(1);
|
2134
2191
|
}
|
2135
2192
|
t._gsClassPT = pt;
|
2136
|
-
pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("
|
2193
|
+
pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("(?:\\s|^)" + e.substr(2) + "(?![\\w-])"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : "");
|
2137
2194
|
t.setAttribute("class", pt.e);
|
2138
2195
|
difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);
|
2139
2196
|
t.setAttribute("class", b);
|
@@ -2328,7 +2385,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2328
2385
|
}
|
2329
2386
|
pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin);
|
2330
2387
|
|
2331
|
-
} else if (isStr &&
|
2388
|
+
} else if (isStr && _complexExp.test(es)) {
|
2332
2389
|
pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin);
|
2333
2390
|
|
2334
2391
|
} else {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: beta 1.4.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: beta 1.4.2
|
3
|
+
* DATE: 2016-04-19
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
5
5
|
*
|
6
6
|
* @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
|
@@ -130,14 +130,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
130
130
|
}
|
131
131
|
parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")";
|
132
132
|
}
|
133
|
-
return parsed;
|
133
|
+
return parsed + s.substr(charIndex);
|
134
134
|
}, p, _colorStringFilter,
|
135
135
|
TweenLite = _gsScope.TweenLite,
|
136
136
|
_colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b", //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
|
137
137
|
|
138
138
|
ColorPropsPlugin = _gsScope._gsDefine.plugin({
|
139
139
|
propName: "colorProps",
|
140
|
-
version: "1.4.
|
140
|
+
version: "1.4.2",
|
141
141
|
priority: -1,
|
142
142
|
API: 2,
|
143
143
|
global: true,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* VERSION: 0.14.
|
3
|
-
* DATE:
|
2
|
+
* VERSION: 0.14.5
|
3
|
+
* DATE: 2016-04-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/).
|
@@ -479,7 +479,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
479
479
|
decoratee.x = (e._gsTransform.xOrigin - v.x);
|
480
480
|
decoratee.y = (e._gsTransform.yOrigin - v.y);
|
481
481
|
} else {
|
482
|
-
if (e.getBBox &&
|
482
|
+
if (e.getBBox && (x + y).indexOf("%") !== -1) { //Firefox doesn't report offsetWidth/height on <svg> elements.
|
483
483
|
e = e.getBBox();
|
484
484
|
e = {offsetWidth: e.width, offsetHeight: e.height};
|
485
485
|
}
|
@@ -502,19 +502,19 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
502
502
|
cache.isSVGRoot = isSVGRoot;
|
503
503
|
cache.borderBox = (cs.boxSizing === "border-box");
|
504
504
|
cache.computedStyle = cs;
|
505
|
-
if (isSVGRoot) {
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
curSVG.removeChild(_tempDiv);
|
511
|
-
}
|
505
|
+
if (isSVGRoot) { //some browsers don't report parentNode on SVG elements.
|
506
|
+
curSVG = e.parentNode || _docElement;
|
507
|
+
curSVG.insertBefore(_tempDiv, e);
|
508
|
+
cache.offsetParent = _tempDiv.offsetParent || _docElement; //in some cases, Firefox still reports offsetParent as null.
|
509
|
+
curSVG.removeChild(_tempDiv);
|
512
510
|
} else if (isSVG) {
|
513
511
|
curSVG = e.parentNode;
|
514
512
|
while (curSVG && (curSVG.nodeName + "").toLowerCase() !== "svg") { //offsetParent is always the SVG canvas for SVG elements.
|
515
513
|
curSVG = curSVG.parentNode;
|
516
514
|
}
|
517
515
|
cache.offsetParent = curSVG;
|
516
|
+
} else {
|
517
|
+
cache.offsetParent = e.offsetParent;
|
518
518
|
}
|
519
519
|
return cache;
|
520
520
|
},
|
@@ -533,7 +533,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
533
533
|
if (e.getBBox && (e.getAttribute("transform") + "").indexOf("matrix") !== -1) { //SVG can store transform data in its "transform" attribute instead of the CSS, so look for that here (only accept matrix()).
|
534
534
|
m = e.getAttribute("transform");
|
535
535
|
}
|
536
|
-
m = (m + "").match(/(
|
536
|
+
m = (m + "").match(/(?:\-|\.|\b)[\d\.e]+\b/g) || [1,0,0,1,0,0];
|
537
537
|
if (m.length > 6) {
|
538
538
|
m = [m[0], m[1], m[4], m[5], m[12], m[13]];
|
539
539
|
}
|
@@ -596,12 +596,13 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
596
596
|
m[4] += _getDocScrollLeft();
|
597
597
|
m[5] += _getDocScrollTop();
|
598
598
|
}
|
599
|
-
if (parent && parent !== _docElement && parentOffsetParent === offsets.offsetParent) {
|
600
|
-
|
601
|
-
m[
|
602
|
-
|
603
|
-
|
604
|
-
m[
|
599
|
+
if (parent && parent !== _docElement && parentOffsetParent === offsets.offsetParent && !parentCache.isSVG) {
|
600
|
+
offsets = (parentCache.isSVGRoot) ? _getSVGOffsets(parent) : parent;
|
601
|
+
m[4] -= offsets.offsetLeft || 0;
|
602
|
+
m[5] -= offsets.offsetTop || 0;
|
603
|
+
if (!_hasBorderBug && parentCache.offsetParent && !cache.isSVG && !cache.isSVGRoot) {
|
604
|
+
m[4] -= parseInt(_getStyle(parentCache.offsetParent, "borderLeftWidth"), 10) || 0;
|
605
|
+
m[5] -= parseInt(_getStyle(parentCache.offsetParent, "borderTopWidth"), 10) || 0;
|
605
606
|
}
|
606
607
|
}
|
607
608
|
}
|
@@ -695,7 +696,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
695
696
|
bbox = e.getBBox();
|
696
697
|
width = bbox.width;
|
697
698
|
height = bbox.height;
|
698
|
-
} else if (e.offsetWidth) {
|
699
|
+
} else if ((e.nodeName + "").toLowerCase() !== "svg" && e.offsetWidth) { //Chrome dropped support for "offsetWidth" on SVG elements
|
699
700
|
width = e.offsetWidth;
|
700
701
|
height = e.offsetHeight;
|
701
702
|
} else {
|
@@ -1133,10 +1134,11 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1133
1134
|
dragEndTime = 0,
|
1134
1135
|
checkAutoScrollBounds = false,
|
1135
1136
|
isClickable = vars.clickableTest || _isClickable,
|
1136
|
-
|
1137
|
+
clickTime = 0,
|
1138
|
+
enabled, scrollProxy, startPointerX, startPointerY, startElementX, startElementY, hasBounds, hasDragCallback, maxX, minX, maxY, minY, tempVars, cssVars, touch, touchID, rotationOrigin, dirty, old, snapX, snapY, isClicking, touchEventTarget, matrix, interrupted, startScrollTop, startScrollLeft, applyObj, allowNativeTouchScrolling, touchDragAxis, isDispatching, clickDispatch,
|
1137
1139
|
//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.
|
1138
1140
|
render = function(suppressEvents) {
|
1139
|
-
if (self.autoScroll &&
|
1141
|
+
if (self.autoScroll && self.isDragging && (checkAutoScrollBounds || dirty)) {
|
1140
1142
|
var e = target,
|
1141
1143
|
autoScrollFactor = self.autoScroll * 15, //multiplying by 15 just gives us a better "feel" speed-wise.
|
1142
1144
|
parent, isRoot, rect, pointerX, pointerY, changeX, changeY, gap;
|
@@ -1497,7 +1499,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1497
1499
|
//called when the mouse is pressed (or touch starts)
|
1498
1500
|
onPress = function(e) {
|
1499
1501
|
var temp, i;
|
1500
|
-
if (!enabled || self.isPressed || !e || (e.type === "mousedown" && _getTime() - clickTime < 30 && _touchEventLookup[self.pointerEvent.type])) { //when we DON'T preventDefault() in order to accommodate touch-scrolling and the user just taps, many browsers also fire a mousedown/mouseup sequence AFTER the touchstart/touchend sequence, thus it'd result in two quick "click" events being dispatched. This line senses that condition and halts it on the subsequent mousedown.
|
1502
|
+
if (!enabled || self.isPressed || !e || ((e.type === "mousedown" || e.type === "pointerdown") && _getTime() - clickTime < 30 && _touchEventLookup[self.pointerEvent.type])) { //when we DON'T preventDefault() in order to accommodate touch-scrolling and the user just taps, many browsers also fire a mousedown/mouseup sequence AFTER the touchstart/touchend sequence, thus it'd result in two quick "click" events being dispatched. This line senses that condition and halts it on the subsequent mousedown.
|
1501
1503
|
return;
|
1502
1504
|
}
|
1503
1505
|
interrupted = isTweening();
|
@@ -1925,7 +1927,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1925
1927
|
|
1926
1928
|
|
1927
1929
|
this.applyBounds = function(newBounds) {
|
1928
|
-
var x, y, forceZeroVelocity;
|
1930
|
+
var x, y, forceZeroVelocity, e, parent, isRoot;
|
1929
1931
|
if (newBounds && vars.bounds !== newBounds) {
|
1930
1932
|
vars.bounds = newBounds;
|
1931
1933
|
return self.update(true);
|
@@ -1935,17 +1937,15 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1935
1937
|
if (hasBounds) {
|
1936
1938
|
x = self.x;
|
1937
1939
|
y = self.y;
|
1938
|
-
if (
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
y = minY;
|
1948
|
-
}
|
1940
|
+
if (x > maxX) {
|
1941
|
+
x = maxX;
|
1942
|
+
} else if (x < minX) {
|
1943
|
+
x = minX;
|
1944
|
+
}
|
1945
|
+
if (y > maxY) {
|
1946
|
+
y = maxY;
|
1947
|
+
} else if (y < minY) {
|
1948
|
+
y = minY;
|
1949
1949
|
}
|
1950
1950
|
if (self.x !== x || self.y !== y) {
|
1951
1951
|
forceZeroVelocity = true;
|
@@ -1957,6 +1957,23 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1957
1957
|
}
|
1958
1958
|
dirty = true;
|
1959
1959
|
render();
|
1960
|
+
if (self.autoScroll && !self.isDragging) {
|
1961
|
+
_recordMaxScrolls(target.parentNode);
|
1962
|
+
e = target;
|
1963
|
+
_windowProxy.scrollTop = ((window.pageYOffset != null) ? window.pageYOffset : (_docElement.scrollTop != null) ? _docElement.scrollTop : _doc.body.scrollTop);
|
1964
|
+
_windowProxy.scrollLeft = ((window.pageXOffset != null) ? window.pageXOffset : (_docElement.scrollLeft != null) ? _docElement.scrollLeft : _doc.body.scrollLeft);
|
1965
|
+
while (e && !isRoot) { //walk up the chain and sense wherever the scrollTop/scrollLeft exceeds the maximum.
|
1966
|
+
isRoot = _isRoot(e.parentNode);
|
1967
|
+
parent = isRoot ? _windowProxy : e.parentNode;
|
1968
|
+
if (allowY && parent.scrollTop > parent._gsMaxScrollY) {
|
1969
|
+
parent.scrollTop = parent._gsMaxScrollY;
|
1970
|
+
}
|
1971
|
+
if (allowX && parent.scrollLeft > parent._gsMaxScrollX) {
|
1972
|
+
parent.scrollLeft = parent._gsMaxScrollX;
|
1973
|
+
}
|
1974
|
+
e = parent;
|
1975
|
+
}
|
1976
|
+
}
|
1960
1977
|
}
|
1961
1978
|
if (self.isThrowing && (forceZeroVelocity || self.endX > maxX || self.endX < minX || self.endY > maxY || self.endY < minY)) {
|
1962
1979
|
animate(vars.throwProps, forceZeroVelocity);
|
@@ -1982,7 +1999,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
1982
1999
|
}
|
1983
2000
|
if (self.autoScroll) {
|
1984
2001
|
_recordMaxScrolls(target.parentNode);
|
1985
|
-
checkAutoScrollBounds =
|
2002
|
+
checkAutoScrollBounds = self.isDragging;
|
1986
2003
|
render();
|
1987
2004
|
}
|
1988
2005
|
return self;
|
@@ -2126,7 +2143,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
|
|
2126
2143
|
p.constructor = Draggable;
|
2127
2144
|
p.pointerX = p.pointerY = 0;
|
2128
2145
|
p.isDragging = p.isPressed = false;
|
2129
|
-
Draggable.version = "0.14.
|
2146
|
+
Draggable.version = "0.14.5";
|
2130
2147
|
Draggable.zIndex = 1000;
|
2131
2148
|
|
2132
2149
|
_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.18.
|
4
|
+
version: 1.18.3.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: 2016-
|
11
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|