4 * Use `Polymer.NeonAnimationBehavior` to implement an animation.
7 Polymer
.NeonAnimationBehavior
= {
12 * Defines the animation timing.
19 easing
: 'cubic-bezier(0.4, 0, 0.2, 1)',
27 registered: function() {
28 new Polymer
.IronMeta({type
: 'animation', key
: this.is
, value
: this.constructor});
32 * Do any animation configuration here.
34 // configure: function(config) {
38 * Returns the animation timing by mixing in properties from `config` to the defaults defined
41 timingFromConfig: function(config
) {
43 for (var property
in config
.timing
) {
44 this.animationTiming
[property
] = config
.timing
[property
];
47 return this.animationTiming
;
51 * Sets `transform` and `transformOrigin` properties along with the prefixed versions.
53 setPrefixedProperty: function(node
, property
, value
) {
55 'transform': ['webkitTransform'],
56 'transformOrigin': ['mozTransformOrigin', 'webkitTransformOrigin']
58 var prefixes
= map
[property
];
59 for (var prefix
, index
= 0; prefix
= prefixes
[index
]; index
++) {
60 node
.style
[prefix
] = value
;
62 node
.style
[property
] = value
;
66 * Called when the animation finishes.
68 complete: function() {}