fix bottom-right position

This commit is contained in:
Marcos Moura 2016-11-25 01:52:27 -02:00
parent 3897394153
commit 495c3b77bf
2 changed files with 6 additions and 16 deletions

View file

@ -16,6 +16,7 @@ $menu-base-width: 56px;
overflow-y: auto;
position: fixed;
z-index: 120;
clip-path: inset(-8px 10% 16% -8px);
background-color: #fff;
border-radius: 2px;
filter: drop-shadow(0 1px 1px rgba(#000, $shadow-key-umbra-opacity))
@ -42,7 +43,7 @@ $menu-base-width: 56px;
&.md-direction-top-right {
margin-top: 11px;
margin-left: -8px;
clip-path: inset(-8px 16% -8px 10%);
clip-path: inset(16% 10% -8px -8px);
}
&.md-direction-top-left {

View file

@ -112,21 +112,10 @@
calculateMenuContentPos() {
let position;
switch (this.mdDirection) {
case 'bottom left':
position = this.getPosition('bottom', 'left');
break;
case 'top left':
position = this.getPosition('top', 'left');
break;
case 'top right':
position = this.getPosition('top', 'right');
break;
default:
position = this.getPosition('bottom', 'right');
if (!this.mdDirection) {
position = this.getPosition('bottom', 'right');
} else {
position = this.getPosition.apply(this, this.mdDirection.trim().split(' '));
}
position = getInViewPosition(this.menuContent, position);