lib/bundle.js
/**
 * Open a the menu as a submenu using the item node for positioning.
 */
Open a the menu as a submenu using the item node for positioning.
Open a the menu as a submenu using the item node for positioning .
function openSubmenu(menu, item) {
    var rect = clientViewportRect();
    var size = mountAndMeasure(menu, rect.height);
    var box = phosphor_domutil_1.boxSizing(menu.node);
    var itemRect = item.getBoundingClientRect();
    var x = itemRect.right - SUBMENU_OVERLAP;
    var y = itemRect.top - box.borderTop - box.paddingTop;
    if (x + size.width > rect.x + rect.width) {
        x = itemRect.left + SUBMENU_OVERLAP - size.width;
    }
    if (y + size.height > rect.y + rect.height) {
        y = itemRect.bottom + box.borderBottom + box.paddingBottom - size.height;
    }
    showMenu(menu, x, y);
}
function openSubmenu ( menu , item ) { var rect = clientViewportRect ( ) ; var size = mountAndMeasure ( menu , rect . height ) ; var box = phosphor_domutil_1 . boxSizing ( menu . node ) ; var itemRect = item . getBoundingClientRect ( ) ; var x = itemRect . right - SUBMENU_OVERLAP ; var y = itemRect . top - box . borderTop - box . paddingTop ; if ( x + size . width > rect . x + rect . width ) { x = itemRect . left + SUBMENU_OVERLAP - size . width ; } if ( y + size . height > rect . y + rect . height ) { y = itemRect . bottom + box . borderBottom + box . paddingBottom - size . height ; } showMenu ( menu , x , y ) ; }
Open a the menu as a submenu using the item node for positioning.
Open a the menu as a submenu using the item node for positioning .