Added vertical margin in calculation of menu position

This commit is contained in:
Trevor Parscal 2011-12-07 23:25:13 +00:00
parent 44f8d155b1
commit f42915ac0f
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@
}
.es-contextView-position-below .es-menuView {
top: 3px;
top: 2px;
}
.es-contextView-panels {

View file

@ -105,7 +105,7 @@ es.ContextView.prototype.set = function() {
}
$menu.css( 'left', menuLeft );
// Position menu on top or bottom depending on viewport
if ( position.top + menuHeight < windowHeight + windowScrollTop ) {
if ( position.top + menuHeight + ( menuMargin * 2 ) < windowHeight + windowScrollTop ) {
this.$.addClass( 'es-contextView-position-below' );
} else {
this.$.addClass( 'es-contextView-position-above' );