5 var PaperMenuButton = Polymer({
7 is: 'paper-menu-button',
10 Polymer.IronA11yKeysBehavior,
11 Polymer.IronControlState
17 * True if the content is currently displayed.
26 * The orientation against which to align the menu dropdown
27 * horizontally relative to the dropdown trigger.
32 reflectToAttribute: true
36 * The orientation against which to align the menu dropdown
37 * vertically relative to the dropdown trigger.
42 reflectToAttribute: true
46 * Set to true to disable animations when opening and closing the
55 * An animation config. If provided, this will be used to animate the
56 * opening of the dropdown.
58 openAnimationConfig: {
62 name: 'fade-in-animation',
68 name: 'paper-menu-grow-width-animation',
72 easing: PaperMenuButton.ANIMATION_CUBIC_BEZIER
75 name: 'paper-menu-grow-height-animation',
79 easing: PaperMenuButton.ANIMATION_CUBIC_BEZIER
86 * An animation config. If provided, this will be used to animate the
87 * closing of the dropdown.
89 closeAnimationConfig: {
93 name: 'fade-out-animation',
98 name: 'paper-menu-shrink-width-animation',
102 easing: PaperMenuButton.ANIMATION_CUBIC_BEZIER
105 name: 'paper-menu-shrink-height-animation',
117 'aria-haspopup': 'true'
121 'iron-activate': '_onIronActivate'
125 * Make the dropdown content appear as an overlay positioned relative
126 * to the dropdown trigger.
129 this.fire('paper-open');
130 this.$.dropdown.open();
134 * Hide the dropdown content.
137 this.fire('paper-close');
138 this.$.dropdown.close();
141 _onIronActivate: function(event) {
146 PaperMenuButton.ANIMATION_CUBIC_BEZIER = 'cubic-bezier(.3,.95,.5,1)';
147 PaperMenuButton.MAX_ANIMATION_TIME_MS = 400;
149 Polymer.PaperMenuButton = PaperMenuButton;