- Reordered the order in which the default selector was determined to more closely match versions prior to 1.13.0. If, for example, "$" referred to jQuery at the time TweenLite/Max loaded and then some other selector engine (like Zepto or Prototype) was loaded that hijacked "$", version 1.13.0 used the latter whereas earlier versions used the former. The goal here is to maximize compatibility with legacy code.
- Fixed minor compatibility problem with jquery.gsap.js plugin
- Added new xPercent and yPercent special properties to CSSPlugin so that you can do percentage-based transforms in addition to px-based ones. Yes, you can combine them like {x:200, xPercent:-50}.
- Added support for document.querySelectorAll() as a fallback when a regular selector engine (like jQuery) isn't present. Previously, getElementById() was used, and it still is when document.querySelectorAll() isn't available.
- Significantly improved compatibility with AMD/RequireJS and CommonJS/Node/Browserify.
- Added "onAutoKill" callback to ScrollToPlugin so that you can have a function called when the user initiates a scroll in the middle of a tween.
- Worked around a very rare rounding issue on certain Microsoft devices that could cause a Draggable not to function properly.
- Fixed issue that could cause values in a timeline to render immediately AFTER its onComplete when a seek() is performed to the very end and the tween hadn't initialized yet (related to the "lazy" feature that defers rendering by default)
- Fixed bug that could cause easeParams not to work properly when the ease is passed as a string instead of a function.
- Fixed bug that could cause zero-duration tweens at the very beginning of a nested timeline not to return to their beginning values if the playhead of the parent timeline goes past the nested timeline's startTime, and then goes back to EXACTLY on top of the startTime, and then before it.
- Improved GC, protecting against a very particular scenario where a user writes bad JS code that maintains a reference to a timeline.
- Added lagSmoothing() feature that automatically heals from CPU spikes.
- Added "lazy" feature that lazy-renders the tween on the tick that it reads its starting values (to avoid the read/write/read/write layout thrashing in some browsers). It is enabled by default on all tweens except zero-duration ones (and set() calls), but you can override the default behavior by defining lazy:true or lazy:false as a special property of any tween.
- Added new force3D:"auto" value that forces 3D transforms to be used during the tween and then automatically switches back to 2D at the end of the tween if there are no 3D properties necessary (rotationX, rotationY, or z); this can help free up GPU memory, especially on mobile devices.
- AttrPlugin can now accommodate non-numeric values. For example, TweenLite.set("#img", {attr:{src:"photo.jpg"}});
- Improved Draggable's touch handling so that when the user taps on a UI element (like a checkbox) inside a Draggable, it works more intuitively. The event.preventDefault() is called in fewer circumstances now.
- Improved Draggable's compatibility with SVG elements.
- Added a "soft" disable() for Draggable that you can call like yourDraggable.disable("soft") in which case it won't remove the mouse/touch listeners, thus it is faster. You can kill() a Draggable if you don't plan to use it anymore.
- Deprecated Draggable's disable() and enable() methods in favor of a new enabled() method that can do both (disable and enable).
- Fixed an issue with Draggable's hitTest() method that caused an error in IE8.
- Fixed issue in jquery.gsap.js plugin that could cause an error with jQuery 2.1 and the way it handles the queue.
- Fixed an issue with IE8 opacity that could cause it not to read the current value properly if the CSS used an upper-case "O" in "Opacity".
- Worked around a browser issue that caused SVG elements not to report their transform properly which could cause string-based transform tweens not to work as expected.
- Improved compatibility with SVG className tweens.
- Fixed issue in TimelineLite's getTweensOf() method that would prevent it from finding tweens after it had completed or had been disabled.
- Fixed issue that caused reversed tweens not to complete in the correct direction when the "complete" parameter of TweenMax.killAll() was true.
- Fixed issue that could cause an infinite loop if the same vars objects are reused and flip-flopped in two fromTo() tweens.
- Enhanced AttrPlugin so that it can set non-numeric values.
- Worked around an issue in the new Firefox 29 that could cause the pivot point of a Draggable of type "rotation" to be miscalculated when the page has been scrolled.
- Fixed an issue that could cause the onThrowUpdateScope and onThrowUpdateParams not to work as expected in Draggable.
- Draggables of type "scroll | scrollTop | scrollLeft" will now kill scrollTo tweens onPress to avoid conflicts.
- When you disable() a Draggable, it no longer kills the tweens affecting it (now only kill() does that). This seemed more intuitive and flexible.
- TimelineMax's tweenTo() tweens will default to overwrite:"all" unless a delay is specified. This helps avoid rare problems with racing conditions when tweenTo() is called on the same timeline over and over again on each frame.
- Fixed problem with CSSPlugin not maintaining skewY on subsequent tweens of the same element.
- Performance improvements
- TimelineLite/Max will now intelligently use TweenMax instances instead of TweenLite instances in the convenience methods like to(), from(), and fromTo() if TweenMax is present and the tween has a "repeat" defined.
- Added caching algorithm for the width of elements when conversion to/from % is required multiple times on the same "tick" for the same element.
- Fixed issue that could cause roundProps not to round SUPER large values correctly.
- Fixed issue that could cause IE9 not to remove prefixed CSS values with clearProps (like transforms)
- Improved Draggable's handling of transformed ancestor elements, including the <body>, as well as partially-scrolled elements
- Eliminated some extra snap function calls in Draggable
- Exposed drag() method in Draggable
- Fixed bug in jquery.gsap.js that could cause queued jQuery animations not to work properly and use excessive memory.
- Added a new feature to CSSPlugin that allows you to set skewType:"simple" to get the behavior that "normal" CSS skew transforms apply which doesn't compensate on the other axis (like a 3D effect). There is also a new static CSSPlugin.defaultSkewType that can be set for a global behavior change. The default is "compensated".
- Fixed issue that could cause an error in IE8 when clicking on a Draggable.
- Fixed issue that could cause an error if clearProps:"all" or clearProps of a transform property was performed on the target of a Draggable of type "x", "x,y", "y", or "rotation".
- Fixed issue that could cause an addPause() pause to be skipped in a very uncommon scenario when running in reverse.
- Fixed an issue that could cause an addPause() or other call() that's positioned exactly at the very end of a timeline to be called upon reverse().
- Enhanced BezierPlugin so that it records the initial rotational values when autoRotate is applied so that when the parent timeline is rewound past the beginning of the Bezier tween, the original values get re-applied.
- Changed some inner workings of CSSPlugin related to transforms in preparation for an upcoming tool.
- Added new EndArrayPlugin for tweening numeric arrays
- Added new Draggable.hitTest() method for testing whether or not a Draggable is overlapping a particular element or the mouse position or arbitrary rectangle. See docs for details.
- Added new Draggable.timeSinceDrag() method that reports the number of seconds since the last drag was ended so that you can, for example, decide if you should allow a particular click event.
- Added onPress and onRelease callbacks/events to Draggable.
- Now Draggable's onDragStart and onDragEnd won't be fired unless the target is moved 3 pixels or more (dragged). This seemed much more intuitive (it shouldn't fire drag-related callbacks unless it's actually dragged).
- Now when you drag an element with a "click" listener (like a link), it will be properly cancelled after being dragged.
- Fixed issue that could cause a Draggable of type "scroll" (or "scrollTop" or "scrollLeft") not to update its width if the target element's width is changed after the Draggable was created.
- Fixed issue that could (in rare situations) cause a Draggable not to render its new position if many mousemove or touchmove events were fired between requestAnimationFrame events.
- Now when a context menu is initiated on a Draggable element, it will properly end the drag.
- Fixed an issue that could cause a TimelineLite or TimelineMax not to auto-adjust its startTime when you add a new child and the timeline is already at its end.
- Fixed an issue that could cause a className tween not to animate correctly in IE8 or earlier.
- Updated KineticPlugin to accommodate array-based values like "points".
- Fixed an issue in KineticPlugin that could cause an error when tweening the x or y property of a "Group" object
- Fixed an issue that could cause a cssRule tween of a transform-related property not to function properly.
- Fixed issue that could prevent transforms from working in Opera if force3D was set to true (regression in 1.11.3)
- Worked around a browser bug affecting Draggable that could cause bounds to be imposed incorrectly (making the target element jump) in a particular scenario.
- Fixed an issue in ScrollToPlugin that could cause a tween to get killed when the maximum scroll value was reached (only if the destination value exceeded the maximum scroll amount).
- Updated KineticPlugin to work with KineticJS 5.0.0 (which means it is not compatible with earlier versions, since KineticJS introduced significant API changes in 5.0.0)
- Worked around Firefox bug that could prevent borderWidth from animating (only if it wasn't defined inline on the element)
- Updated copyright dates
- Enhanced Draggable so that it can accommodate elements that are nested inside ancestor elements that have transforms applied (like scale, rotation, etc.). The only caveat is that it's best to not have bounds that are rotated differently than the target element.
- Fixed issue that could cause a Draggable not to apply its "snap" if the user throws the target, then interrupts it before movement stops, and then doesn't move the mouse/touch more than 3 pixels before releasing (rare, I know).
- Changed behavior of Draggable's disable() method so that it doesn't remove the instance from the internal lookup table, thus you could still Draggable.get("#yourID") and it'd work. Also added a kill() method that DOES remove it from the internal lookup table, releasing it for garbage collection.
- Fixed minor issue with TweenMax.updateTo() that could cause it not to reset the duration if the tween had completed or was killed.
- Fixed issue that could cause a zero-duration tween or callback not to fire if its parent timeline's playhead was moved directly on top of it more than once in the same "tick".
- Now the TimelineLite/Max stagger methods copy its smoothChildTiming property to the sub-timeline to avoid behavioral differences in parent/child. (This was only an issue if you specifically set the TimelineLite/Max's smoothChildTiming to true)
- Fixed a floating point rounding error that [in EXTREMELY rare situations] could cause zero-duration tweens at the very beginning of a timeline not to render properly when the playhead is returned to the very beginning after having played through.
- Fixed issue in the tweenTo() and tweenFromTo() methods of TimelineLite/Max that could cause a manual change to the duration of the resulting tween not to be honored.
- Made the default lineHeight suffix of CSSPlugin blank
- Fixed issue that could cause a 3D transforms tween to revert to 2D if you create a 2D tween on an element, then a 3D transform tween on the same element, and the 2D one ends later than the 3D one. For example, an infinitely repeating pulsating scale tween and then a quick rotationY tween (only if force3D wasn't true).
- The "scale" shortcut for CSSPlugin no longer affects scaleZ. It should only affect scaleX and scaleY.
- Fixed a CSSPlugin issue that caused percentages to be capped at 100% when a unit conversion was necessary between the from and to values. For example, 80px to 130%.
- Fixed issue that caused null targets to be interpreted as arrays.
- Fixed issue that could cause a zero-duration tween to be overwritten if it is positioned exactly at the start time of another tween of the same target.
- Fixed issue that could cause an onUpdate not to fire for a zero-duration tween.
- Added new "lockAxis" feature to Draggable that [optionally] automatically locks dragging to either the horizontal or vertical axis (depending on the direction that the user begins dragging)
- Improved IE11 compatibility with Draggable (previously clicks/touches were intermittently ignored in IE11 only).
- Fixes regression that prevented the core ticker from powering down after no tweens are active (just to save some CPU cycles).
- Fixed issue that could cause a percentage-based css tween to measure as if the target is absolutely positioned even if it's not.
- Worked around a bug in the Firefox browser related to animating a 32-bit PNG from a scale of 0 in which case the transparent areas got rendered as black on the Mac.
- Worked around a bug in the Firefox browser that caused thin broken black borders on elements whose transform had a perspective applied but no other 3D-related transforms like z, rotationX, or rotationY.
- Fixed an issue that could cause a backgroundPosition css tween not to render its initial position correctly in Firefox.
- Fixed issue that could cause a callback (or zero-duration tween) not to render correctly the 2nd time if seek() is called on its parent timeline from within that same callback (rare, but possible).
- Fixed issue that could cause text selection to remain disabled on the target element of a Draggable after its disable() method is invoked.
- Fixed regression in 0.9.3 that caused <span> elements not to be draggable unless you added data-clickable="false" to the element as an attribute or put dragClickables:true on your Draggable.
- Improved idle performance by only activating the "tick" listener the first time an element is clicked/touched and then deactivated the listener after 15 seconds of inactivity.
- Added "newBounds" parameter to applyBounds() method so that you can [optionally] define a new bounds object/element.
- Added onThrowUpdateParams and onThrowCompleteParams.
General:
--------
- Added isActive() method to all animation classes (TweenLite, TweenMax, TimelineLite, and TimelineMax)
- Added progress() and totalProgress() methods to TweenLite (they were already available in TweenMax, TimelineLite, and TimelineMax)
- Added a new "onlyActive" parameter to the getTweensOf() and killTweensOf() methods so that it's easy to find (or kill) only the active tweens of a particular target/element/object.
- Worked around an issue with the way browsers handle the "instanceof Array" evaluation in iframes that could cause the condition to return false when it should be true
- Fixed several issues that could cause zero-duration tweens inside timelines to render incorrectly in very particular (and rare) scenarios
- Adjusted behavior of callbacks (and zero-duration tweens) in timelines so that if the playhead moves directly on top of the callback/tween when suppressEvents is true, it will execute callbacks on the following render (when the playhead leaves that spot). So callbacks will get triggered EITHER when the playhead arrives OR when it leaves that spot (not both).
- Now if TweenLite is loaded more than once, only the first will matter (subsequent loads will basically be ignored) in terms of class definition.
Plugins:
----------
- Changed from storing "rotation" (and skewX/skewY) as radians to degrees in _gsTransform for better consistency.
- Fixed issue that could cause a relative opacity value not to work ("+=" or "-=" prefix)
- Worked around IE8 issue that could cause a className tween to throw an error in a rare circumstance.
- Added "userSelect" support (with automatic vendor prefixing)
- Fixed issue that could cause clearProps to get applied at the beginning of a from() tween in addition to at the end (it should only occur at the end).
- Fixed issue that could cause the "max" property not to be calculated properly on a scrollTo tween if the target was the window.
Draggable:
----------
- Windows 8 touch compatible
- There's a new "liveSnap" feature that you can turn on by setting liveSnap:true - that causes any snapping rules to apply during the drag (without liveSnap:true, snapping only applies to the END value(s)). This can be useful if, for example, you want to drag a box that always must fit in a grid or you want to rotate something in 10-degree increments (or whatever).
- You can specifically define maximum and minimum x/y/rotation values for bounds, like bounds:{minX:10, maxX:200, minY:20, maxY:300}. It will also recognize "maxRotation" and "minRotation", like bounds:{maxRotation:90, minRotation:-90}. This is a new option; you can still define bounds the old way instead with either a DOM element (like bounds:"#myElementID") or a generic object with top/left/width/height properties (like bounds:{top:10, left:20, width:100, height:200}). The new maxX/minX/maxY/minY technique is useful if, for example, you have an element that should be able to move 200 pixels to the left but you don't necessarily know its starting position.
- New "rotation", "endRotation", "maxRotation", and "minRotation" properties (which are identical to "x", "endX", "maxX" and "minX" but named more intuitively). It shouldn't break existing code because x/endX/maxX/minX are still populated in the same way. It just seemed like code would be more readable this way when the Draggable type is "rotation".
- Rotation is now always degree-based instead of radian-based. (this also applies to the data stored in the undocumented _gsTransform object in case you're tapping into that)
- There's a new "dragResistance" property (a value between 0 and 1) that controls how much resistance there is during any dragging (not just outside the bounds which is what edgeResistance affects).
- "resistance" has been renamed "throwResistance" so that it's more descriptive (now that we have edgeResistance and dragResistance, it seemed like plain "resistance" was just too vague).
- There's a new "pointerEvent" property that records the last mouse (or touch) event that affected the Draggable instance. That way, you can access that event's data like target, currentTarget, pageX, pageY, etc. By default, that event is also passed as a parameter to callbacks like onDragStart, onDrag, and onDragEnd.
- Added startDrag() and endDrag() methods so that you can manually trigger those, but please note that you MUST pass a mouse (or touch) event as a parameter to those because it's imperative for them to be able to do things like get the pageX and pageY for the mouse/touch position, and preventDefault(), etc.
- <a> links, input fields, textareas, buttons, and elements with an "onclick" are all treated like live elements that should allow click interaction instead of initiating dragging, plus you can manually mark something as "clickable" by adding a data-clickable="true" attribute.
- A few minor bug fixes.
- Significant update to Draggable (changes listed below)
- Added new "endX", "endY", "pointerX" and "pointerY" properties to Draggable
- Renamed Draggable's xMax, xMin, yMax, and yMin properties to maxX, minX, maxY, and minY in order to be consistent with the other new properties like endX, pointerX, etc.
- Added a new applyBounds() and update() methods to Draggable
- Added the ability to have rotated elements work with bounds in Draggable
- Added new onThrowComplete and onThrowUpdate callbacks in Draggable
- Added new Draggable.get() method that allows you to find the Draggable instance associated with a particular element.
- Now the Draggable's x and y properties auto-update over the course of the throwProps tween by default.
- New "tween" property that refers to the actual TweenLite instance that’s generated by ThrowPropsPlugin when the mouse/touch is released.
- Worked around bug in IE9 that could cause a Draggable with type:"rotation" to use the top center as the default transformOrigin instead of the true center.
- Now when a link is clicked/tapped, the event's preventDefault() won't be called (so that the link will work) in Draggable.
- Various minor bug fixes and improvements in Draggable
----
- Fixed issue that could cause clearProps not to affect transformOrigin
- Improved compatibility with IE8's AlphaImageLoader filter so that it can be used in some cases to avoid the black edges on transparent PNGs.
- Fixed issue that could ignore transformPerspective when no rotation or skew was involved in the transform
- Added "frame" support in EaselPlugin (to tween the frame number of a MovieClip)
- Improved handling of situations where a tween/timeline is added to a timeline that was already finished (it needs to resume playback intuitively).
- Fixed an issue that could cause a timeline's rawTime() to be reported incorrectly in a very rare situation.
- Added new "trigger" functionality for defining a child element that serves as the initiator of dragging.
- Worked around several bugs in the stock browser of several Android devices.
- Improved performance by shifting rendering from mousemove/touchmove event handlers to the main requestAnimationFrame loop that drives GSAP.
- Improved algorithm for sensing the velocity of the user's mouse/touch.
- Fixed an issue that caused an error when the Draggable JS file was loaded BEFORE the <body> tag was declared.
- Added TweenMax.globalTimeScale() method for getting/setting the global time scale (often it's better to use TimelineLite.exportRoot(), though, so please see docs).
- Added a workaround for the iOS bug that sometimes neglects to call the requestAnimationFrame callback when returning to a tab that had been inactive (browser bug, not GSAP), causing animations to cease.
- Fixed issue that could cause tweens in a nested TimelinLite or TimelineMax not to render their beginning states correctly when the virtual playhead of the grandparent is moved backwards beyond the starting point of the parent timeline.
- Altered autoAlpha behavior in CSSPlugin so that instead of explicitly setting visibility to "visible" when opacity isn't zero, it now sets it to "inherit" so that behaves more intuitively when it has an ancestor whose visibility is "hidden" (the descendent should honor that)
- Fixed an issue that could cause fromTo() tweens not to render their initial state correctly when the "from" value is relative (has a "+=" or "-=" prefix).
- Added "scroll", "scrollTop", and "scrollLeft" types to Draggable and improved performance.
- Minor performance improvements
- Fixed issue that could cause the last tween in a TweenMax.staggerTo() not to swap in the tween instance for "{self}" in the onCompleteParams when an onCompleteAll was defined.
- Fixed an issue in AttrPlugin that could cause an error if the starting and ending values of the tween are identical.
- Fixed an issue in CSSPlugin that could cause the scaleZ not to be applied correctly in 3D transforms.
- Added a "force3D" boolean special property for CSSPlugin that, when true, applies a 3D transform which typically causes the browser to promote that element to its own layer on the GPU when possible (this can improve performance).
- Fixed an issue in KineticPlugin that could cause directional rotation values not to work after the first time.
- Changed the behavior of TextPlugin from() tweens so that it is more intuitive in terms of the direction.
- The _addTween() method of TweenPlugin now returns the PropTween instance if one is created (or null if not). This can help optimize some other code.
- Minor optimizations
- Added new Draggable class (in the "utils" package) that makes it simple to make almost any element draggable or spinnable, and impose bounds and (if you have ThrowPropsPlugin) apply kinetic-based motion.
- Added new "addPause()" method to TimelineLite that allows you to insert a pause action that will force calibration of the time at that exact spot and optionally call another method.
- Altered the order of operation in 3D CSS transforms so that scaleX and scaleY occur before rotation instead of after, thus they appear to always stay oriented with the element itself (this is the more common and intuitive behavior).
- Fixed issue that could cause a timeline to render things incorrectly if it was paused and seeked to an earlier time and then resumed (regression since 1.9.2)
- Fixed issue that could cause a security error if "window" was used as the target of a tween from within an iframe.
- Fixed autoAlpha issue in IE8 that could cause a flicker (the bug was actually in IE8 but we implemented a workaround)
- Fixed issue that could prevent tweening the css border of an <img> when autoCSS was used
- Fixed TweenMax.pauseAll() and TweenMax.resumeAll() so that the default "timelines" parameter is true instead of false.
- Small speed improvements for 3D transforms
- Now if you clearProps:"all", it will wipe all transform data stored in _gsTransforms
- Slightly enhanced 3D transform speed so that if you're only moving the element, translate3d() is used instead of matrix3d().
- Now transforms are remembered by default instead of always re-parsing the css data because some browsers incorrectly report that data in certain scenarios, causing odd behavior. Using the GSAP-recorded values is faster anyway. You may force re-parsing of the transform data by passing parseTransform:true in the vars object.
- Fixed issue that could prevent autoRotate from working on BezierPlugin tweens of DOM elements using top/left instead of x/y (only when no transforms had been applied previously to that element).
- Fixed issue that could cause a <select> DOM element to be interpreted as a selector, thus its children would be affected by the tween instead of the element itself.
- Fixed an issue that could cause kill() not to work when you define specific css-related properties for the kill() to affect without prefixing them with "css_".
- Fixed issue that could cause the "x" portion of backgroundPosition to be interpreted as 50% instead of 0 in a very rare scenario, mostly in Firefox.
- The virtual playhead of a TimelineLite and TimelineMax instance now adjusts backwards if necessary when children are removed. For example, if the timeline has completely played and then all children are removed, its virtual playhead will return to 0.
- Fixed issue that could cause all callbacks to be removed from a TimelineMax if null was passed to its removeCallback() method as the first parameter.
- Fixed issue in TimelineMax that could cause a problem if its pause() method is called from within its onRepeat.
- Improved iOS and Safari performance
- GSAP is now compatible with AngularJS's jqLite objects.
- Added feature to KineticPlugin so that it now works with DirectionalRotationPlugin
- Added auto-sensing of zero-duration tweens in the to() and fromTo() convenience methods of TimelineLite and TimelineMax so that immediateRender is automatically set in the most intuitive way (you can still override that). Basically, it zero-duration values get forwarded to the set() method.
- Fixed issue that could cause an error to be thrown in IE8 (and earlier) or Opera on transform-related properties that aren't supported. For example, if you tried to set transformStyle in IE8 or a perspective in Opera.
- Fixed very rare issue that could cause a tween to be killed prematurely if kill() was called for a particular property before the tween had fully initted.
- Fixed an issue that could cause a tween to be overwritten when it's back-to-back in a timeline with another tween of the same object/property and a rounding error occurs, making things 0.0000000001 off. (EXTREMELY rare)
- Fixed issue in TextPlugin that could cause non-breaking spaces to be added when the new text is shorter than the old text (this could look odd if the text-align is center). You can get the behavior back by setting padSpace:true.
- Fixes an issue that could cause callbacks not to fire if they are placed at the VERY beginning of a TimelineMax and it repeats. (recent regression)
- Fixes an issue in CSSPlugin that could cause x/y portions of transforms to be reverted to 0 in a rare scenario, only in IE8 and earlier.
- Adds ability for directional rotation suffixes to be combined like "20_cw_short" or "30_ccw_short" so that you can go in a particular direction but prevent it from going around more than once.
- Improvements to the ticker's fps capping algorithm
- Worked around an iOS bug that prevents requestAnimationFrame from working correctly in certain [relatively rare] situations. Falls back to setTimeout() in that scenario.
- Fixed issue that could cause zero-duration tweens/callbacks at the very beginning of a timeline not to fire their onReverseComplete if the playhead lands on a SUPER small value, like 0.000001 seconds.
- Adjusted the behavior of TimelineMax's tweenFromTo() method so that it seeks to the initial from() spot. That way, events/callbacks are suppressed which seems like the more natural behavior.
- Improved KineticPlugin, making it compatible with BezierPlugin internally
- Minor improvements in CSSPlugin, mostly around 3D calculations