CSSPlugin Class
A TweenJS plugin for working with numeric CSS string properties (ex. top, left). To use simply install after TweenJS has loaded:
createjs.CSSPlugin.install();
You can adjust the CSS properties it will work with by modifying the cssSuffixMap
property. Currently,
the top, left, bottom, right, width, height have a "px" suffix appended.
Please note that the CSS Plugin is not included in the TweenJS minified file.
Constructor
CSSPlugin
()
Item Index
Properties
- cssSuffixMap static
- priority static
Methods
init
()
protected
static
install
()
static
Installs this plugin for use with TweenJS. Call this once after TweenJS is loaded to enable this plugin.
step
()
protected
static
tween
()
protected
static
Properties
cssSuffixMap
Object
static
Defines the default suffix map for CSS tweens. This can be overridden on a per tween basis by specifying a cssSuffixMap value for the individual tween. The object maps CSS property names to the suffix to use when reading or setting those properties. For example a map in the form {top:"px"} specifies that when tweening the "top" CSS property, it should use the "px" suffix (ex. target.style.top = "20.5px"). This only applies to tweens with the "css" config property set to true.