Skip to content

Commit

Permalink
2.1.0
Browse files Browse the repository at this point in the history
- NEW: get rich, organic staggers that are spaced according to any ease and/or proximity to a position. For example, you can have things emanate outward from the "center" or a certain index. It'll even accommodate grids, complete with auto-calculated columns and rows (great for responsive layouts)! These work in all of the stagger methods like staggerTo(), staggerFrom(), and staggerFromTo() on TweenMax and TimelineLite/Max. Interactive example: https://codepen.io/GreenSock/full/jdawKx

- NEW: MorphSVGPlugin recognizes a new type:"rotational" special property that completely eliminates kinks that occasionally occur between two smooth anchors, mid-tween. See https://codepen.io/GreenSock/full/2e907cfa0fd05ca534ddd3592d73b9c2/ for a demo. You can also set MorphSVGPlugin.defaultType = "rotational" to change the default (from "linear").

- NEW: MorphSVGPlugin's new type:"rotational" feature recognizes an "origin" property, as demonstrated here: https://codepen.io/GreenSock/full/vvjOGq and there's a findMorphOrigin() utility function that helps you experiment with origin placement: https://codepen.io/GreenSock/pen/5e05b5ddaab75e7b5ce135396a8dc4df?editors=0010

- NEW: MorphSVGPlugin can be used to draw morphing shapes directly to <canvas> now, using the "render" special property (or MorphSVGPlugin.defaultRender for the default). See https://codepen.io/GreenSock/pen/WYWZab?editors=0010

- NEW: MorphSVGPlugin has 2 new static methods: stringToRawPath() and rawPathToString() for converting between SVG path data strings and RawPath arrays.

- NEW: you can define an activeCursor for Draggable that's only in effect between pressing and releasing. So, for example, {cursor:"grab", activeCursor:"grabbing"}. Or you can set cursor:false now to prevent the cursor from changing on rollover.

- NEW: added the ability to define a custom "tag" in SplitText (by default it's "div").

- NEW: added basic support for px-based inset() clip-path animation in CSSPlugin.

- NEW: ScrambleTextPlugin recognizes emoji characters

- IMPROVED: MorphSVGPlugin has a more optimized algorithm for selecting shapeIndexes on complex shapes that aren't filled with fill-rule:nonzero, so you'll see less flipping of shapes when there are multiple segments

- IMPROVED: function-based "cycle" values in the stagger methods now receive a 3rd parameter which is the entire "targets" array (or NodeList). This makes it possible for even more advanced effects.

- IMPROVED: Added the preset-env to the "browserify" configuration of the package.json (see #280).

- IMPROVED: ScrambleTextPlugin now trims the extra white space from the very start and end of the text values (unless you set trim:false).

- IMPROVED: Draggable's dragClickables is true by default now (previously it was false, but a change in React 16.5.x made it more pressing to switch the default behavior to avoid confusion). See facebook/react#13654 (comment)

- IMPROVED: Added /* eslint-disable */ to files to prevent linting hassles

- IMPROVED: when animating complex strings, numeric values are limited to 3 decimal places to improve performance and reduce memory consumption.

- IMPROVED: if you set the animation of a GSDevTools instance to a repeating animation and globalSync:false, it'll automatically enable "loop" on the GSDevTools instance.

- IMPROVED: TimelineLite/Max.set() consistently has its immediateRender default to false now. Previously, it would default to true only if the position was the current time (typically at the beginning). If this breaks any of your code, the soution is to simply add immediateRender:true to any set() calls that are at the very beginning of a timeline.

- FIXED: if you declare a liveSnap on a Draggable instance as an array (like liveSnap:[0,90,180]), it would always snap to the first value.

- FIXED: ScrollToPlugin now works with relative values like "+=600"

- FIXED: ScrambleTextPlugin tweens of multiple targets that didn't have any "text" defined would use the text from the first target instead of the original text from each target. That's resolved now.

- FIXED: In iOS 9 Safari, an error could be thrown in Draggable for the passive flag in addEventListener().

- FIXED: Missing dependencies Power2, Power3, Linear, and AttrPlugin in the ES6 GSDevTools module

- FIXED: ThrowPropsPlugin doesn't throw an error in windowless environments now.

- FIXED: worked around a bug in Microsoft Edge that could throw an error when getComputedStyle is called without a specific scope, like window.getComputedStyle().

- FIXED: worked around an issue in very uncommon environments that could cause an error due to createElementNS() not allowing access to the resulting element's "style" property. See #288

- FIXED: if you had a set() at the very beginning of a timeline that was paused before calling set(), and that timeline had a fromTo() or from() after that set(), and both dealt with transforms, the set() may act as if it's ignored. VERY rare. :) See https://greensock.com/forums/topic/19549-transform-origin-updated-only-once/

- FIXED: if you set the "z" component of a transformOrigin to a non-zero value (through GSAP), and then tried to set it BACK to zero, it failed.

- FIXED: if a tween has immediateRender:true and invalidate() is called on it when its time is non-zero, it would render at a time of zero. Not anymore - it'll render at the current time.

- FIXED: upon resuming a timeline that was paused with an addPause() after a drop in the frame rate, it could seem to jump ahead slightly. That's fixed now.

- FIXED: if you target a root <svg> element with a Draggable and set bounds to another element and transform-origin isn't "left top", the bounds could be calculated incorrectly.

- FIXED: a callback from a zero-duration tween might get fired twice in an extremely rare situation (if the parent timeline's playhead shot past it, and then moved back on top of it but due to computer rounding errors it rendered at an extremely small negative value). Not anymore.

- FIXED: if you place a zero-duration animation/callback in a timeline and then alter its position (startTime) after it has rendered, and then restart the timeline (or move the playhead backward) it may not render properly the second time through.

- FIXED: if you use TimelineLite/Max.paused() method without any parameters when the timeline is paused EXACTLY on top of an addPause() pause, it could cause the pause to behave oddly the next time through.

- FIXED: if a Draggable element was inside a position:fixed parent, the origin of rotation could be miscalculated

- FIXED: the onComplete of an animation that's shorter than 2 seconds might fire again inadvertently if GSDevTools was loaded.

- FIXED: if you try animating any transform-related values of an element that has CSS rule-based transforms applied and whose decendent has display:none (thus the element is out of the document flow), the browser mis-reports the existing transforms. CSSPlugin now works around that scenario.

- FIXED: if a Draggable is applied to an SVG that's nested inside a transformed (scaled) element that's further outside of its offsetParent, the Draggable element may not follow the mouse properly (too faster or too slow, depending on the scale).

- FIXED: if a function-based value was defined for transform-related CSS values, some of the functions may get called twice. Not anymore.
  • Loading branch information
gsap-dev committed Feb 17, 2019
1 parent 53f4a8d commit 087853f
Show file tree
Hide file tree
Showing 70 changed files with 2,217 additions and 1,834 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#### Ultra high-performance, professional-grade animation for the modern web

GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser. No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 4 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...animate anything! At its core, GSAP is a high-speed property manipulator, updating values over time with extreme accuracy. It's up to 20x faster than jQuery! See the <a href="https://greensock.com/why-gsap/">"Why GSAP?"</a> article for what makes GSAP so special.
GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser. No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 7 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...animate anything! At its core, GSAP is a high-speed property manipulator, updating values over time with extreme accuracy. It's up to 20x faster than jQuery! See the <a href="https://greensock.com/why-gsap/">"Why GSAP?"</a> article for what makes GSAP so special.

<a href="https://greensock.com/docs">Full documentation</a>

Expand All @@ -23,13 +23,13 @@ This is the public repository for GreenSock's JavaScript tools like <a href="htt
### CDN
TweenMax is most popular because it has all the essential tools plus several common <a href="https://greensock.com/plugins/?product_id=4921">plugins</a>, all in one file:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.0/TweenMax.min.js"></script>
```
Click the green "Download GSAP" button at <a href="https://greensock.com/?download=GSAP-JS">greensock.com</a> for more options. Click "customize" at the bottom of the resulting window to see all the extra plugins and tool URLs.

Draggable, for example, is at:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/utils/Draggable.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.0/utils/Draggable.min.js"></script>
```

Most ad networks have GSAP on their CDNs as well, so contact them for the appropriate URL(s).
Expand All @@ -49,12 +49,12 @@ import {TweenMax, Power2, TimelineLite} from "gsap/TweenMax";
import Draggable from "gsap/Draggable";
import ScrollToPlugin from "gsap/ScrollToPlugin";

//or, as of 2.0.0, all tools are exported from the "all" file (excluding bonus plugins):
//or, as of 2.0, all tools are exported from the "all" file (excluding bonus plugins):
import {TweenMax, CSSPlugin, ScrollToPlugin, Draggable, Elastic} from "gsap/all";
//if tree shaking dumps plugins, just reference them somewhere in your code like:
const plugins = [CSSPlugin, ScrollToPlugin];
```
As of version 2.0.0, the NPM files are ES modules, though there's also a /umd/ directory with UMD files for extra compatibility.
As of version 2.0, the NPM files are ES modules, though there's also a /umd/ directory with UMD files for extra compatibility.

For <a href="https://greensock.com/club/">Club GreenSock</a>-only plugins, download them from your GreenSock.com account and then treat them as part of your own JS payload or drop them into your node_modules/gsap folder. Post other questions in our <a href="https://greensock.com/forums/">forums</a> and we'd be happy to help.

Expand Down Expand Up @@ -97,4 +97,4 @@ Sign up for a free GreenSock account to gain access to <a href="https://greensoc
### License
GreenSock's standard "no charge" license can be viewed at <a href="https://greensock.com/standard-license">http://greensock.com/standard-license</a>. <a href="https://greensock.com/club/">Club GreenSock</a> members are granted additional rights. See <a href="https://greensock.com/licensing/">http://greensock.com/licensing/</a> for details. Why doesn't GreenSock use an MIT (or similar) open source license, and why is that a **good** thing? This article explains it all: <a href="https://greensock.com/why-license/" target="_blank">http://greensock.com/why-license/</a>

Copyright (c) 2008-2018, GreenSock. All rights reserved.
Copyright (c) 2008-2019, GreenSock. All rights reserved.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gsap",
"version": "2.0.2",
"version": "2.1.0",
"description": "The most flexible, high-performance animation library on the planet. Animate any property of any object. Solves browser quirks.",
"author": {
"name": "Jack Doyle",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gsap",
"version": "2.0.2",
"description": "GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser (or beyond the browser). No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 4 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. Animate CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...pretty much anything! At its core, GSAP is a property manipulator, updating values over time very quickly with extreme accuracy. And it's up to 20x faster than jQuery! See http://greensock.com/why-gsap/ for details about what makes GSAP so special.",
"version": "2.1.0",
"description": "GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser (or beyond the browser). No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world problems on over 7 million sites. GSAP works around countless browser inconsistencies; your animations 'just work'. Animate CSS properties, SVG, canvas libraries, custom properties of generic objects, colors, strings...pretty much anything! At its core, GSAP is a property manipulator, updating values over time very quickly with extreme accuracy. And it's up to 20x faster than jQuery! See http://greensock.com/why-gsap/ for details about what makes GSAP so special.",
"homepage": "https://greensock.com/gsap/",
"module": "./src/esm/index.js",
"main": "./src/uncompressed/TweenMax.js",
Expand Down Expand Up @@ -59,7 +59,7 @@
"tweening"
],
"browserify": {
"transform": ["babelify"]
"transform": [["babelify", { "presets": ["@babel/preset-env"] }]]
},
"maintainers": [
{
Expand Down
3 changes: 2 additions & 1 deletion src/esm/AttrPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
* DATE: 2018-08-27
* UPDATES AND DOCS AT: http://greensock.com
*
* @license Copyright (c) 2008-2018, GreenSock. All rights reserved.
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
* This work is subject to the terms at http://greensock.com/standard-license or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, [email protected]
*/
/* eslint-disable */

import { _gsScope } from "./TweenLite.js";

Expand Down
3 changes: 2 additions & 1 deletion src/esm/BezierPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
* DATE: 2018-05-30
* UPDATES AND DOCS AT: http://greensock.com
*
* @license Copyright (c) 2008-2018, GreenSock. All rights reserved.
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
* This work is subject to the terms at http://greensock.com/standard-license or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, [email protected]
**/
/* eslint-disable */
import { _gsScope } from "./TweenLite.js";

var _RAD2DEG = 180 / Math.PI,
Expand Down
72 changes: 41 additions & 31 deletions src/esm/CSSPlugin.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
/*!
* VERSION: 2.0.2
* DATE: 2018-08-27
* VERSION: 2.1.0
* DATE: 2019-02-15
* UPDATES AND DOCS AT: http://greensock.com
*
* @license Copyright (c) 2008-2018, GreenSock. All rights reserved.
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
* This work is subject to the terms at http://greensock.com/standard-license or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, [email protected]
*/
/* eslint-disable */

import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";

_gsScope._gsDefine("plugins.CSSPlugin", ["plugins.TweenPlugin","TweenLite"], function() {
Expand All @@ -28,7 +30,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
p = CSSPlugin.prototype = new TweenPlugin("css");

p.constructor = CSSPlugin;
CSSPlugin.version = "2.0.2";
CSSPlugin.version = "2.1.0";
CSSPlugin.API = 2;
CSSPlugin.defaultTransformPerspective = 0;
CSSPlugin.defaultSkewType = "compensated";
Expand Down Expand Up @@ -61,7 +63,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
_dummyElement = {style:{}},
_doc = _gsScope.document || {createElement: function() {return _dummyElement;}},
_createElement = function(type, ns) {
return _doc.createElementNS ? _doc.createElementNS(ns || "http://www.w3.org/1999/xhtml", type) : _doc.createElement(type);
return (ns && _doc.createElementNS) ? _doc.createElementNS(ns, type) : _doc.createElement(type);
},
_tempDiv = _createElement("div"),
_tempImg = _createElement("img"),
Expand Down Expand Up @@ -123,7 +125,10 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
return null;
},

_getComputedStyle = (typeof(window) !== "undefined" ? window : _doc.defaultView || {getComputedStyle:function() {}}).getComputedStyle,
_computedStyleScope = (typeof(window) !== "undefined" ? window : _doc.defaultView || {getComputedStyle:function() {}}),
_getComputedStyle = function(e) {
return _computedStyleScope.getComputedStyle(e); //to avoid errors in Microsoft Edge, we need to call getComputedStyle() from a specific scope, typically window.
},

/**
* @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do:
Expand Down Expand Up @@ -1058,6 +1063,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
this.multi = options.multi;
this.keyword = options.keyword;
this.dflt = options.defaultValue;
this.allowFunc = options.allowFunc;
this.pr = options.priority || 0;
},

Expand Down Expand Up @@ -1336,7 +1342,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
var tm = e._gsTransform || new Transform(),
rnd = 100000,
style = e.style,
isDefault, s, m, n, dec, none;
isDefault, s, m, n, dec, nextSibling, parent;
if (_transformProp) {
s = _getStyle(e, _transformPropCSS, null, true);
} else if (e.currentStyle) {
Expand All @@ -1345,24 +1351,31 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";
}
isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
if (_transformProp && ((none = (!_getComputedStyle(e) || _getComputedStyle(e).display === "none")) || !e.parentNode)) { //note: Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
if (none) { //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
n = style.display;
style.display = "block";
}
if (!e.parentNode) {
if (_transformProp && isDefault && !e.offsetParent) { //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
//browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
n = style.display;
style.display = "block";
parent = e.parentNode;
if (!parent || !e.offsetParent) {
dec = 1; //flag
_docElement.appendChild(e);
nextSibling = e.nextSibling;
_docElement.appendChild(e); //we must add it to the DOM in order to get values properly
}
s = _getStyle(e, _transformPropCSS, null, true);
isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)");
if (n) {
style.display = n;
} else if (none) {
} else {
_removeProp(style, "display");
}
if (dec) {
_docElement.removeChild(e);
if (nextSibling) {
parent.insertBefore(e, nextSibling);
} else if (parent) {
parent.appendChild(e);
} else {
_docElement.removeChild(e);
}
}
}
if (tm.svg || (e.getCTM && _isSVG(e))) {
Expand Down Expand Up @@ -1924,12 +1937,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
_registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin", {parser:function(t, e, parsingProp, cssp, pt, plugin, vars) {
if (cssp._lastParsedTransform === vars) { return pt; } //only need to parse the transform once, and only if the browser supports it.
cssp._lastParsedTransform = vars;
var scaleFunc = (vars.scale && typeof(vars.scale) === "function") ? vars.scale : 0, //if there's a function-based "scale" value, swap in the resulting numeric value temporarily. Otherwise, if it's called for both scaleX and scaleY independently, they may not match (like if the function uses Math.random()).
swapFunc;
if (typeof(vars[parsingProp]) === "function") { //whatever property triggers the initial parsing might be a function-based value in which case it already got called in parse(), thus we don't want to call it again in here. The most efficient way to avoid this is to temporarily swap the value directly into the vars object, and then after we do all our parsing in this function, we'll swap it back again.
swapFunc = vars[parsingProp];
vars[parsingProp] = e;
}
var scaleFunc = (vars.scale && typeof(vars.scale) === "function") ? vars.scale : 0; //if there's a function-based "scale" value, swap in the resulting numeric value temporarily. Otherwise, if it's called for both scaleX and scaleY independently, they may not match (like if the function uses Math.random()).
if (scaleFunc) {
vars.scale = scaleFunc(_index, t);
}
Expand Down Expand Up @@ -2053,7 +2061,7 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
}
}

orig = v.transformOrigin;
orig = (typeof(v.transformOrigin) === "function") ? v.transformOrigin(_index, _target) : v.transformOrigin;
if (m1.svg && (orig || v.svgOrigin)) {
x = m1.xOffset; //when we change the origin, in order to prevent things from jumping we adjust the x/y so we must record those here so that we can create PropTweens for them and flip them at the same time as the origin
y = m1.yOffset;
Expand All @@ -2070,14 +2078,18 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
if (_transformProp) {
hasChange = true;
p = _transformOriginProp;
orig = (orig || _getStyle(t, p, _cs, false, "50% 50%")) + ""; //cast as string to avoid errors
if (!orig) {
orig = (_getStyle(t, p, _cs, false, "50% 50%") + "").split(" ");
orig = orig[0] + " " + orig[1] + " " + m1.zOrigin + "px";
}
orig += "";
pt = new CSSPropTween(style, p, 0, 0, pt, -1, transformOriginString);
pt.b = style[p];
pt.plugin = plugin;
if (_supports3D) {
copy = m1.zOrigin;
orig = orig.split(" ");
m1.zOrigin = ((orig.length > 2 && !(copy !== 0 && orig[2] === "0px")) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method.
m1.zOrigin = ((orig.length > 2) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method.
pt.xs0 = pt.e = orig[0] + " " + (orig[1] || "50%") + " 0px"; //we must define a z value of 0px specifically otherwise iOS 5 Safari will stick with the old one (if one was defined)!
pt = new CSSPropTween(m1, "zOrigin", 0, 0, pt, -1, pt.n); //we must create a CSSPropTween for the _gsTransform.zOrigin so that it gets reset properly at the beginning if the tween runs backward (as opposed to just setting m1.zOrigin here)
pt.b = copy;
Expand All @@ -2094,16 +2106,14 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
if (hasChange) {
cssp._transformType = (!(m1.svg && _useSVGTransformAttr) && (has3D || this._transformType === 3)) ? 3 : 2; //quicker than calling cssp._enableTransforms();
}
if (swapFunc) {
vars[parsingProp] = swapFunc;
}
if (scaleFunc) {
vars.scale = scaleFunc;
}
return pt;
}, prefix:true});
}, allowFunc:true, prefix:true});

_registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"});
_registerComplexSpecialProp("clipPath", {defaultValue:"inset(0px)", prefix:true, multi:true, formatter:_getFormatter("inset(0px 0px 0px 0px)", false, true)});

_registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {
e = this.format(e);
Expand Down Expand Up @@ -2534,10 +2544,10 @@ import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
p, sp, bn, en, bs, es, bsfx, esfx, isStr, rel;
for (p in vars) {
es = vars[p]; //ending value string
if (typeof(es) === "function") {
sp = _specialProps[p]; //SpecialProp lookup.
if (typeof(es) === "function" && !(sp && sp.allowFunc)) {
es = es(_index, _target);
}
sp = _specialProps[p]; //SpecialProp lookup.
if (sp) {
pt = sp.parse(target, es, p, this, pt, plugin, vars);
} else if (p.substr(0,2) === "--") { //for tweening CSS variables (which always start with "--"). To maximize performance and simplicity, we bypass CSSPlugin altogether and just add a normal property tween to the tween instance itself.
Expand Down
4 changes: 3 additions & 1 deletion src/esm/CSSRulePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
* DATE: 2018-08-27
* UPDATES AND DOCS AT: http://greensock.com
*
* @license Copyright (c) 2008-2018, GreenSock. All rights reserved.
* @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
* This work is subject to the terms at http://greensock.com/standard-license or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, [email protected]
*/
/* eslint-disable */

import TweenLite, { _gsScope, globals, TweenPlugin } from "./TweenLite.js";
import CSSPlugin from "./CSSPlugin.js";

Expand Down
Loading

0 comments on commit 087853f

Please sign in to comment.