Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * @fileoverview Defines fade animations similar to Polymer's fade-in-animation | |
| 7 * and fade-out-animation, but with Settings-specific timings. | |
| 8 */ | |
| 9 Polymer({ | |
| 10 is: 'settings-fade-in-animation', | |
| 11 | |
| 12 behaviors: [Polymer.NeonAnimationBehavior], | |
| 13 | |
| 14 configure: function(config) { | |
| 15 var node = config.node; | |
| 16 this._effect = new KeyframeEffect(node, [ | |
| 17 {'opacity': '0'}, | |
| 18 {'opacity': '1'} | |
|
Dan Beam
2017/05/04 22:46:37
fun fact: if you add a trailing comma, clang-forma
michaelpg
2017/05/04 23:07:25
Nice. I like trailing commas (this was mostly copi
| |
| 19 ], { | |
| 20 duration: settings.animation.Timing.DURATION, | |
| 21 easing: settings.animation.Timing.EASING, | |
| 22 fill: 'both', | |
| 23 }); | |
| 24 return this._effect; | |
| 25 } | |
| 26 }); | |
| 27 | |
| 28 Polymer({ | |
| 29 is: 'settings-fade-out-animation', | |
| 30 | |
| 31 behaviors: [Polymer.NeonAnimationBehavior], | |
| 32 | |
| 33 configure: function(config) { | |
| 34 var node = config.node; | |
| 35 this._effect = new KeyframeEffect(node, [ | |
| 36 {'opacity': '1'}, | |
| 37 {'opacity': '0'} | |
| 38 ], { | |
| 39 duration: settings.animation.Timing.DURATION, | |
| 40 easing: settings.animation.Timing.EASING, | |
| 41 fill: 'both', | |
| 42 }); | |
| 43 return this._effect; | |
| 44 } | |
| 45 }); | |
| OLD | NEW |