Commit 0a1b7428 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Calculate menu heights base on viewport height.

This way more members will fit into menus.

Also make linge-height of all the members in menu the same.
parent 5130de7e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -45,12 +45,19 @@ Ext.define('Docs.view.HoverMenuButton', {
        }

        this.menu = Ext.create('Docs.view.HoverMenu', {
            store: this.store
            store: this.store,
            columnHeight: this.getColumnHeight()
        });

        this.callParent(arguments);
    },

    getColumnHeight: function() {
        var compensation = 200;
        var lineHeight = 18;
        return Math.floor((Ext.Element.getViewportHeight() - compensation) / lineHeight);
    },

    onRender: function() {
        this.callParent(arguments);

+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
  background: #eaeaea;
  z-index: 8;
  top: 21px;
  line-height: 1.3em;
  border: 1px solid #e4e4e4;
  border-top: 1px solid #eaeaea;
  left: -16px;