| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Use `Polymer.NeonAnimationBehavior` to implement an animation. | 2 * Use `Polymer.NeonAnimationBehavior` to implement an animation. |
| 3 * @polymerBehavior | 3 * @polymerBehavior |
| 4 */ | 4 */ |
| 5 Polymer.NeonAnimationBehavior = { | 5 Polymer.NeonAnimationBehavior = { |
| 6 | 6 |
| 7 properties: { | 7 properties: { |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Defines the animation timing. | 10 * Defines the animation timing. |
| 11 */ | 11 */ |
| 12 animationTiming: { | 12 animationTiming: { |
| 13 type: Object, | 13 type: Object, |
| 14 value: function() { | 14 value: function() { |
| 15 return { | 15 return { |
| 16 duration: 500, | 16 duration: 500, |
| 17 easing: 'cubic-bezier(0.4, 0, 0.2, 1)', | 17 easing: 'cubic-bezier(0.4, 0, 0.2, 1)', |
| 18 fill: 'both' | 18 fill: 'both' |
| 19 } | 19 } |
| 20 } | 20 } |
| 21 } | 21 } |
| 22 | 22 |
| 23 }, | 23 }, |
| 24 | 24 |
| 25 registered: function() { | 25 /** |
| 26 new Polymer.IronMeta({type: 'animation', key: this.is, value: this.constru
ctor}); | 26 * Can be used to determine that elements implement this behavior. |
| 27 }, | 27 */ |
| 28 isNeonAnimation: true, |
| 28 | 29 |
| 29 /** | 30 /** |
| 30 * Do any animation configuration here. | 31 * Do any animation configuration here. |
| 31 */ | 32 */ |
| 32 // configure: function(config) { | 33 // configure: function(config) { |
| 33 // }, | 34 // }, |
| 34 | 35 |
| 35 /** | 36 /** |
| 36 * Returns the animation timing by mixing in properties from `config` to the
defaults defined | 37 * Returns the animation timing by mixing in properties from `config` to the
defaults defined |
| 37 * by the animation. | 38 * by the animation. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 59 } | 60 } |
| 60 node.style[property] = value; | 61 node.style[property] = value; |
| 61 }, | 62 }, |
| 62 | 63 |
| 63 /** | 64 /** |
| 64 * Called when the animation finishes. | 65 * Called when the animation finishes. |
| 65 */ | 66 */ |
| 66 complete: function() {} | 67 complete: function() {} |
| 67 | 68 |
| 68 }; | 69 }; |
| OLD | NEW |