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

Side by Side Diff: third_party/polymer/components-chromium/core-dropdown-menu/core-dropdown-menu-extracted.js

Issue 1215543002: Remove Polymer 0.5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 5 years, 5 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
2
3 (function() {
4
5 var p = {
6
7 publish: {
8
9 /**
10 * A label for the control. The label is displayed if no item is selected.
11 *
12 * @attribute label
13 * @type string
14 * @default 'Select an item'
15 */
16 label: 'Select an item',
17
18 /**
19 * The icon to display when the drop-down is opened.
20 *
21 * @attribute openedIcon
22 * @type string
23 * @default 'arrow-drop-up'
24 */
25 openedIcon: 'arrow-drop-up',
26
27 /**
28 * The icon to display when the drop-down is closed.
29 *
30 * @attribute closedIcon
31 * @type string
32 * @default 'arrow-drop-down'
33 */
34 closedIcon: 'arrow-drop-down'
35
36 },
37
38 selectedItemLabel: '',
39
40 overlayListeners: {
41 'core-overlay-open': 'openAction',
42 'core-activate': 'activateAction',
43 'core-select': 'selectAction'
44 },
45
46 activateAction: function(e) {
47 this.opened = false;
48 },
49
50 selectAction: function(e) {
51 var detail = e.detail;
52 if (detail.isSelected) {
53 this.selectedItemLabel = detail.item.label || detail.item.textContent;
54 } else {
55 this.selectedItemLabel = '';
56 }
57 }
58
59 };
60
61 Polymer.mixin2(p, Polymer.CoreFocusable);
62 Polymer('core-dropdown-menu',p);
63
64 })();
65
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698