- 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.