OLD | NEW |
(Empty) | |
| 1 <link rel="import" href="../polymer/polymer.html"> |
| 2 |
| 3 <polymer-element name="polymer-animation-keyframe" attributes="offset value easi
ng"> |
| 4 <script> |
| 5 /** |
| 6 * Defines a keyframe in an animation. Its children should be |
| 7 * `<polymer-animation-prop>` elements specifying the css |
| 8 * property value at the keyframe. |
| 9 * |
| 10 * @class polymer-animation-keyframe |
| 11 */ |
| 12 /** |
| 13 * From 0 to 1. |
| 14 * @property offset |
| 15 * @type Number |
| 16 */ |
| 17 Polymer('polymer-animation-keyframe', { |
| 18 get properties() { |
| 19 var props = {}; |
| 20 var children = this.querySelectorAll('polymer-animation-prop'); |
| 21 Array.prototype.forEach.call(children, function(c) { |
| 22 props[c.name] = c.value; |
| 23 }); |
| 24 if (this.offset !== null) { |
| 25 props.offset = this.offset; |
| 26 } |
| 27 return props; |
| 28 } |
| 29 }); |
| 30 </script> |
| 31 </polymer-element> |
| 32 |
OLD | NEW |