Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Side by Side Diff: chrome/browser/resources/settings/animation/fade_animations.js

Issue 2856223007: MD Settings: Shorten page fade transitions (Closed)
Patch Set: closure Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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(
17 node,
18 [
19 {'opacity': '0'},
20 {'opacity': '1'},
21 ],
22 /** @type {!KeyframeEffectOptions} */ ({
23 duration: settings.animation.Timing.DURATION,
24 easing: settings.animation.Timing.EASING,
25 fill: 'both',
26 }));
27 return this._effect;
28 }
29 });
30
31 Polymer({
32 is: 'settings-fade-out-animation',
33
34 behaviors: [Polymer.NeonAnimationBehavior],
35
36 configure: function(config) {
37 var node = config.node;
38 this._effect = new KeyframeEffect(
39 node,
40 [
41 {'opacity': '1'},
42 {'opacity': '0'},
43 ],
44 /** @type {!KeyframeEffectOptions} */ ({
45 duration: settings.animation.Timing.DURATION,
46 easing: settings.animation.Timing.EASING,
47 fill: 'both',
48 }));
49 return this._effect;
50 }
51 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698