Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * This file defines a set of common animations used by | 7 * This file defines a set of common animations used by |
| 8 * 'settings-animated-pages'. | 8 * 'settings-animated-pages'. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| 11 is: 'next-page-enter-animation', | 11 is: 'settings-fade-in-animation', |
| 12 | 12 |
| 13 behaviors: [ | 13 behaviors: [ |
| 14 Polymer.NeonAnimationBehavior | 14 Polymer.NeonAnimationBehavior |
| 15 ], | 15 ], |
| 16 | 16 |
| 17 configure: function(config) { | 17 configure: function(config) { |
|
Dan Beam
2015/08/13 21:52:10
can you just customize polymer animations?
tommycli
2015/08/13 22:46:47
I don't think so.
I haven't found an easy way to
Dan Beam
2015/08/14 21:23:06
pretty sure we can, it just may require sending a
| |
| 18 var node = config.node; | 18 var node = config.node; |
| 19 | 19 |
| 20 var timing = this.timingFromConfig(config); | 20 var timing = this.timingFromConfig(config); |
| 21 timing.delay = 150; | 21 timing.delay = 150; |
| 22 timing.duration = 150; | 22 timing.duration = 150; |
| 23 | 23 |
| 24 this._effect = new KeyframeEffect(node, [ | 24 this._effect = new KeyframeEffect(node, [ |
| 25 {'opacity': '0'}, | 25 {'opacity': '0'}, |
| 26 {'opacity': '1'} | 26 {'opacity': '1'} |
| 27 ], timing); | 27 ], timing); |
| 28 return this._effect; | 28 return this._effect; |
| 29 } | 29 } |
| 30 }); | 30 }); |
| 31 | 31 |
| 32 Polymer({ | 32 Polymer({ |
| 33 is: 'next-page-exit-animation', | 33 is: 'settings-fade-out-animation', |
| 34 | 34 |
| 35 behaviors: [ | 35 behaviors: [ |
| 36 Polymer.NeonAnimationBehavior | 36 Polymer.NeonAnimationBehavior |
| 37 ], | 37 ], |
| 38 | 38 |
| 39 configure: function(config) { | 39 configure: function(config) { |
| 40 var node = config.node; | 40 var node = config.node; |
| 41 | 41 |
| 42 var timing = this.timingFromConfig(config); | 42 var timing = this.timingFromConfig(config); |
| 43 timing.duration = 150; | 43 timing.duration = 150; |
| 44 | 44 |
| 45 this._effect = new KeyframeEffect(node, [ | 45 this._effect = new KeyframeEffect(node, [ |
| 46 {'opacity': '1'}, | 46 {'opacity': '1'}, |
| 47 {'opacity': '0'} | 47 {'opacity': '0'} |
| 48 ], timing); | 48 ], timing); |
| 49 return this._effect; | 49 return this._effect; |
| 50 } | 50 } |
| 51 }); | 51 }); |
| OLD | NEW |