Skip to content

Commit

Permalink
Expose fit-into default this is window but in some cases you want to
Browse files Browse the repository at this point in the history
use another `fit-into` target. This is in general handy when you’re using
`dynamic-align=true` and the element where you want your
`paper-dropdown-menu` want to fit into  is _not_ `window`
This only will work if issue [108 of
paper-menu-button](PolymerElements/paper-menu-button#108)
is fixed, because `paper-dropdown-menu` is using `paper-menu-button`
  • Loading branch information
victor-perez committed Jan 1, 2017
1 parent 676be7b commit 6af47ef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions paper-dropdown-menu-light.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
no-animations="[[noAnimations]]"
on-iron-select="_onIronSelect"
on-iron-deselect="_onIronDeselect"
fit-into="[[fitInto]]"
opened="{{opened}}"
close-on-activate
allow-outside-scroll="[[allowOutsideScroll]]">
Expand Down Expand Up @@ -424,6 +425,13 @@
value: 'right'
},

/**
* The element to fit `this` into.
*/
fitInto: {
type: Object
},

/**
* The orientation against which to align the menu dropdown
* vertically relative to the dropdown trigger.
Expand Down
8 changes: 8 additions & 0 deletions paper-dropdown-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
on-iron-select="_onIronSelect"
on-iron-deselect="_onIronDeselect"
opened="{{opened}}"
fit-into="[[fitInto]]"
close-on-activate
allow-outside-scroll="[[allowOutsideScroll]]">
<div class="dropdown-trigger">
Expand Down Expand Up @@ -258,6 +259,13 @@
value: 'top'
},

/**
* The element to fit `this` into.
*/
fitInto: {
type: Object
},

/**
* If true, the `horizontalAlign` and `verticalAlign` properties will
* be considered preferences instead of strict requirements when
Expand Down

0 comments on commit 6af47ef

Please sign in to comment.