Skip to content

Commit

Permalink
3.6.1
Browse files Browse the repository at this point in the history
- NEW: you can define onStart, onComplete, and onInterrupt callbacks in the snap:{} object of a ScrollTrigger to sense when snapping starts, completes or gets interrupted. See https://greensock.com/forums/topic/27305-scrolltrigger-feature-request-onsnapinterrupt-callback/

- NEW: you can prevent ScrollTrigger from factoring inertia into snapping by passing in inertia: false via a snap object, like snap: {snapTo: "labels", inertia: false, duration: 0.5}

- NEW: MorphSVGPlugin.normalizeStrings() method that lets you feed in two path data strings and it'll return an Array with normalized strings that contain the same number of points.

- NEW: you can append "nowrap" to a drawSVG value to prevent the stroke from wrapping/looping, like drawSVG: "80% 120% nowrap".

- NEW: added a LottieScrollTrigger helper function to the docs: https://greensock.com/docs/v3/HelperFunctions#lottie

- IMPROVED: removed pixel snapping in ScrollToPlugin because most browsers support sub-pixel scroll values now.

- IMPROVED: when you kill() a tween/timeline that's attached to a ScrollTrigger, it will also kill that ScrollTrigger.

- FIXED: if a zIndex is set on a Flip.from() call, it may take 1 tick before being applied (unless you set immediateRender: true). Now setting a zIndex will automatically make the animation default to immediateRender: true.

- FIXED: TypeScript improvement for PixiPlugin to accommodate string-based (relative) values for x, y, and a few others. See #430

- FIXED: regression in 3.5.0 caused ScrollToPlugin's onAutoKill callback not to get triggered properly. See https://greensock.com/forums/topic/26840-scrolltoplugin-onautokill-callback-not-firing-timeline-issues/

- FIXED: if you animate a path that has vector-effect="non-scaling-stroke", it could throw an error. See https://greensock.com/forums/topic/26915-drawsvg-console-error-with-non-scaling-strokes/

- FIXED: in certain rare cases, setting the playhead of a repeating timeline to a value that crosses the repeat boundary backwards (spanning iterations), it could render at the start incorrectly.

- FIXED: if you attempt to use Draggable on a shadow dom element, it could throw an error (regression in 3.6.0). See #431

- FIXED: onStart fired on zero-duration tweens/timelines even though it shouldn't (onStart is for when the playhead moves from the 0 position). Related to #419

- FIXED: if you had default units for x, y, width, or height set to something other than "px", it could affect Flip. See https://greensock.com/forums/topic/26977-flip-conflicting-with-altering-units-in-config/

- FIXED: a regression in 3.6.0 could cause problems when animating a CSS variable that's a color.

- FIXED: when plotting global coordinates of a root <svg> element (which could happen in Flip or MotionPathPlugin or Draggable), if the contents of that <svg> are scaled it could offset things incorrectly. See https://greensock.com/forums/topic/27152-flipping-svgs/

- FIXED: if an animation is killed from within its onRepeat callback, it could render slightly past where it should. See https://greensock.com/forums/topic/27176-gsap-3-tween-a-timeline-object/

- FIXED: changed "mousewheel" event listening to "wheel" in ScrollTrigger for better compatibility. See #434

- FIXED: if you used a ScrollTrigger snap of "labelsDirectional", in rare situations it might snap again after the initial snap, going to the next label, then the next.

- FIXED: in an extremely uncommon scenario, a ScrollTrigger that's supposed to snap might not snap if you scroll very slowly and interrupt the snap.

- FIXED: regression in 3.6.0 caused timeline.tweenTo()/tweenFromTo(), to ignore an ease defined in the vars (it always used ease: "none"). See https://greensock.com/forums/topic/27351-tweento-ease-not-working/

- FIXED: if you set a "transform" value to a matrix() on an SVG element, it could be decomposed incorrectly in certain scenarios. This could, in very rare situations, also affect how transforms are parsed for regular DOM elements too (scaleY could be inverted) See https://greensock.com/forums/topic/27394-setting-gsaps-matrix-transform-data-to-match-that-defined-in-an-svg/

- FIXED: Draggables of type: "top,left" didn't properly update their deltaX property.

- FIXED: Draggables of type: "top,left" could, in rare circumstances, dispatch events as though it had been dragged even when it was only clicked (not moved beyond the minimumMovement). So the "onClick()" wouldn't fire on occasion.

- FIXED: if you create a timeline-based ScrollTrigger like gsap.timeline({scrollTrigger:{...}}) that performs pinning and then immediately create other ScrollTriggers for things further down on the page, and you do so AFTER the initial page load, the subsequent ScrollTriggers may not factor in the pinning properly until you call ScrollTrigger.refresh(). See https://greensock.com/forums/topic/27495-scrolltrigger-react-trouble-when-pinnings-multiple-elements-on-the-same-page/

- FIXED: there's a very rare scenario that could cause an infinite loop when you kill() the last ScrollTrigger, as described at #440

- FIXED: MotionPathHelper.editPath() correctly handles closed paths now (start and end anchors are merged).

- FIXED: if repeatRefresh was set on a repeating timeline, it could do the refresh twice in a row on the same tick (1 extra time). See https://greensock.com/forums/topic/27571-timeline-function-called-twice-per-loop/
  • Loading branch information
jackdoyle committed Mar 25, 2021
1 parent e066b1f commit 40bd026
Show file tree
Hide file tree
Showing 76 changed files with 746 additions and 356 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ View the <a href="https://greensock.com/docs">full documentation here</a>, inclu

### CDN
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.0/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.1/gsap.min.js"></script>
```
Click the green "Get GSAP Now" button at <a href="https://greensock.com/?download=GSAP-JS">greensock.com</a> for more options and installation instructions, including CDN URLs for various plugins.

Expand Down
4 changes: 2 additions & 2 deletions dist/CSSRulePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}(this, (function (exports) { 'use strict';

/*!
* CSSRulePlugin 3.6.0
* CSSRulePlugin 3.6.1
* https://greensock.com
*
* @license Copyright 2008-2021, GreenSock. All rights reserved.
Expand Down Expand Up @@ -51,7 +51,7 @@
};

var CSSRulePlugin = {
version: "3.6.0",
version: "3.6.1",
name: "cssRule",
init: function init(target, value, tween, index, targets) {
if (!_checkRegister() || typeof target.cssText === "undefined") {
Expand Down
4 changes: 2 additions & 2 deletions dist/CSSRulePlugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/CSSRulePlugin.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 14 additions & 18 deletions dist/Draggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@
x = y = 0;
}

container.setAttribute("transform", "matrix(" + m.a + "," + m.b + "," + m.c + "," + m.d + "," + (m.e + x) + "," + (m.f + y) + ")");
(isRootSVG ? svg : parent).appendChild(container);
container.setAttribute("transform", "matrix(" + m.a + "," + m.b + "," + m.c + "," + m.d + "," + (m.e + x) + "," + (m.f + y) + ")");
} else {
x = y = 0;

Expand All @@ -208,7 +208,7 @@
if (cs.position !== "absolute") {
m = element.offsetParent;

while (parent !== m) {
while (parent && parent !== m) {
x += parent.scrollLeft || 0;
y += parent.scrollTop || 0;
parent = parent.parentNode;
Expand Down Expand Up @@ -1232,11 +1232,7 @@
var _this2;

_this2 = _EventDispatcher.call(this) || this;

if (!gsap) {
_initCore(1);
}

_coreInitted || _initCore(1);
target = _toArray(target)[0];

if (!InertiaPlugin) {
Expand Down Expand Up @@ -1430,7 +1426,7 @@
}

if (allowX) {
self.deltaY = x - parseFloat(target.style.left || 0);
self.deltaX = x - parseFloat(target.style.left || 0);
target.style.left = x + "px";
}
}
Expand Down Expand Up @@ -1478,8 +1474,8 @@
self.y = scrollProxy.top();
self.x = scrollProxy.left();
} else {
self.y = parseInt(target.style.top || (cs = _getComputedStyle(target)) && cs.top, 10) || 0;
self.x = parseInt(target.style.left || (cs || {}).left, 10) || 0;
self.y = parseFloat(target.style.top || (cs = _getComputedStyle(target)) && cs.top) || 0;
self.x = parseFloat(target.style.left || (cs || {}).left) || 0;
}

if ((snapX || snapY || snapXY) && !skipSnap && (self.isDragging || self.isThrowing)) {
Expand Down Expand Up @@ -1888,8 +1884,8 @@
}
}

self.startX = startElementX;
self.startY = startElementY;
self.startX = startElementX = _round(startElementX);
self.startY = startElementY = _round(startElementY);
},
isTweening = function isTweening() {
return self.tween && self.tween.isActive();
Expand Down Expand Up @@ -2279,6 +2275,11 @@

dirty = false;

if (wasDragging) {
dragEndTime = _lastDragTime = _getTime();
self.isDragging = false;
}

if (isClicking && !isContextMenuRelease) {
if (e) {
_removeListener(e.target, "change", onRelease);
Expand Down Expand Up @@ -2306,11 +2307,6 @@
}
}

if (wasDragging) {
dragEndTime = _lastDragTime = _getTime();
self.isDragging = false;
}

_dragCount--;

if (e) {
Expand Down Expand Up @@ -2898,7 +2894,7 @@
});

Draggable.zIndex = 1000;
Draggable.version = "3.6.0";
Draggable.version = "3.6.1";
_getGSAP() && gsap.registerPlugin(Draggable);

exports.Draggable = Draggable;
Expand Down
4 changes: 2 additions & 2 deletions dist/Draggable.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/Draggable.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/EasePack.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}(this, (function (exports) { 'use strict';

/*!
* EasePack 3.6.0
* EasePack 3.6.1
* https://greensock.com
*
* @license Copyright 2008-2021, GreenSock. All rights reserved.
Expand Down Expand Up @@ -201,7 +201,7 @@

for (var p in EasePack) {
EasePack[p].register = _initCore;
EasePack[p].version = "3.6.0";
EasePack[p].version = "3.6.1";
}

_getGSAP() && gsap.registerPlugin(SlowMo);
Expand Down
Loading

0 comments on commit 40bd026

Please sign in to comment.