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

Side by Side Diff: ui/webui/resources/cr_elements/cr_shared_menu/cr_shared_menu.js

Issue 2222013003: MD WebUI: Simplify cr-shared-menu exit animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** Same as paper-menu-button's custom easing cubic-bezier param. */ 5 /** Same as paper-menu-button's custom easing cubic-bezier param. */
6 var SLIDE_CUBIC_BEZIER = 'cubic-bezier(0.3, 0.95, 0.5, 1)'; 6 var SLIDE_CUBIC_BEZIER = 'cubic-bezier(0.3, 0.95, 0.5, 1)';
7 7
8 Polymer({ 8 Polymer({
9 is: 'cr-shared-menu', 9 is: 'cr-shared-menu',
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 }, 63 },
64 64
65 closeAnimationConfig: { 65 closeAnimationConfig: {
66 type: Object, 66 type: Object,
67 value: function() { 67 value: function() {
68 return [{ 68 return [{
69 name: 'fade-out-animation', 69 name: 'fade-out-animation',
70 timing: { 70 timing: {
71 duration: 150 71 duration: 150
72 } 72 }
73 }, {
74 name: 'paper-menu-shrink-width-animation',
75 timing: {
76 delay: 100,
77 duration: 50,
78 easing: SLIDE_CUBIC_BEZIER
79 }
80 }, {
81 name: 'paper-menu-shrink-height-animation',
82 timing: {
83 delay: 200,
84 easing: 'ease-in'
85 }
86 }]; 73 }];
87 } 74 }
88 } 75 }
89 }, 76 },
90 77
91 keyBindings: { 78 keyBindings: {
92 'tab': 'onTabPressed_', 79 'tab': 'onTabPressed_',
93 }, 80 },
94 81
95 listeners: { 82 listeners: {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 * Prevent focus restoring when tapping outside the menu. This stops the 198 * Prevent focus restoring when tapping outside the menu. This stops the
212 * focus moving around unexpectedly when closing the menu with the mouse. 199 * focus moving around unexpectedly when closing the menu with the mouse.
213 * @param {CustomEvent} e 200 * @param {CustomEvent} e
214 * @private 201 * @private
215 */ 202 */
216 onOverlayCanceled_: function(e) { 203 onOverlayCanceled_: function(e) {
217 if (e.detail.type == 'tap') 204 if (e.detail.type == 'tap')
218 this.$.dropdown.restoreFocusOnClose = false; 205 this.$.dropdown.restoreFocusOnClose = false;
219 }, 206 },
220 }); 207 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698