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

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

Issue 2206363003: [MD History] Use proper shadows for cards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_rounding
Patch Set: address comment, fix test 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
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
11 behaviors: [Polymer.IronA11yKeysBehavior], 11 behaviors: [Polymer.IronA11yKeysBehavior],
12 12
13 properties: { 13 properties: {
14 menuOpen: { 14 menuOpen: {
15 type: Boolean, 15 type: Boolean,
16 observer: 'menuOpenChanged_', 16 observer: 'menuOpenChanged_',
17 value: false, 17 value: false,
18 notify: true,
18 }, 19 },
19 20
20 /** 21 /**
21 * The contextual item that this menu was clicked for. 22 * The contextual item that this menu was clicked for.
22 * e.g. the data used to render an item in an <iron-list> or <dom-repeat> 23 * e.g. the data used to render an item in an <iron-list> or <dom-repeat>
23 * @type {?Object} 24 * @type {?Object}
24 */ 25 */
25 itemData: { 26 itemData: {
26 type: Object, 27 type: Object,
27 value: null, 28 value: null,
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 /** 189 /**
189 * Ensure the menu is reset properly when it is closed by the dropdown (eg, 190 * Ensure the menu is reset properly when it is closed by the dropdown (eg,
190 * clicking outside). 191 * clicking outside).
191 * @private 192 * @private
192 */ 193 */
193 menuOpenChanged_: function() { 194 menuOpenChanged_: function() {
194 if (!this.menuOpen) 195 if (!this.menuOpen)
195 this.itemData = null; 196 this.itemData = null;
196 }, 197 },
197 }); 198 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698