OLD | NEW |
(Empty) | |
| 1 |
| 2 Polymer('core-menu-button', { |
| 3 /** |
| 4 * The icon to display. |
| 5 * @attribute icon |
| 6 * @type string |
| 7 */ |
| 8 icon: 'dots', |
| 9 src: '', |
| 10 /** |
| 11 * The index of the selected menu item. |
| 12 * @attribute selected |
| 13 * @type number |
| 14 */ |
| 15 selected: '', |
| 16 /** |
| 17 * Set to true to open the menu. |
| 18 * @attribute opened |
| 19 * @type boolean |
| 20 */ |
| 21 opened: false, |
| 22 /** |
| 23 * Set to true to cause the menu popup to be displayed inline rather |
| 24 * than in its own layer. |
| 25 * @attribute inlineMenu |
| 26 * @type boolean |
| 27 */ |
| 28 inlineMenu: false, |
| 29 /** |
| 30 * Horizontally align the overlay with the button. Accepted values are |
| 31 * ["left", "center", "right"]. |
| 32 * @attribute halign |
| 33 * @type string |
| 34 */ |
| 35 halign: 'center', |
| 36 /** |
| 37 * Display the overlay on top or below the button. Accepted values are |
| 38 * ["top", "bottom"]. |
| 39 * @attribute valign |
| 40 * @type string |
| 41 */ |
| 42 valign: 'bottom', |
| 43 multi: false, |
| 44 closeAction: function() { |
| 45 this.opened = false; |
| 46 }, |
| 47 /** |
| 48 * Toggle the opened state of the dropdown. |
| 49 * @method toggle |
| 50 */ |
| 51 toggle: function() { |
| 52 this.opened = !this.opened; |
| 53 }, |
| 54 /** |
| 55 * The selected menu item. |
| 56 * @property selection |
| 57 * @type Node |
| 58 */ |
| 59 get selection() { |
| 60 return this.$.menu.selection; |
| 61 } |
| 62 }); |
| 63 |
OLD | NEW |