2 * Use `Polymer.NeonAnimationBehavior` to implement an animation.
5 Polymer.NeonAnimationBehavior = {
10 * Defines the animation timing.
17 easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
25 registered: function() {
26 new Polymer.IronMeta({type: 'animation', key: this.is, value: this.constructor});
30 * Do any animation configuration here.
32 // configure: function(config) {
36 * Returns the animation timing by mixing in properties from `config` to the defaults defined
39 timingFromConfig: function(config) {
41 for (var property in config.timing) {
42 this.animationTiming[property] = config.timing[property];
45 return this.animationTiming;
49 * Sets `transform` and `transformOrigin` properties along with the prefixed versions.
51 setPrefixedProperty: function(node, property, value) {
53 'transform': ['webkitTransform'],
54 'transformOrigin': ['mozTransformOrigin', 'webkitTransformOrigin']
56 var prefixes = map[property];
57 for (var prefix, index = 0; prefix = prefixes[index]; index++) {
58 node.style[prefix] = value;
60 node.style[property] = value;
64 * Called when the animation finishes.
66 complete: function() {}