ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Flexible Height Plugin Height Set Falls Short When Horizontal Scroll Present

Open netblue opened this issue 13 years ago • 3 comments

The flexible height plugin does not appear to set the height large enough when the a horizontal scroll bar appears for a canvas that is wider than the view port.

netblue avatar Aug 01 '13 17:08 netblue

This change fixed it for me.

In ng-flexible-height.js make the following changes.

Change line 13 from:

var extraHeight = self.grid.$topPanel.height() + $(footerPanelSel).height(); 

to

var extraHeight = self.grid.$topPanel.height() + $(footerPanelSel).height() + 3; 

and after line 14 (where it initialises naturalHeight) add in the following:

if (self.grid.$canvas[0].scrollHeight > self.grid.$canvas.height())
{
       // scroll bar shown
      naturalHeight = self.grid.$canvas[0].scrollHeight + 1;
 }

shazzababs avatar Dec 20 '13 08:12 shazzababs

If the above isn't good as a stopgap, can you provide a plunker

roblarsen avatar Dec 21 '13 15:12 roblarsen

Did not work for me so I had to add this after line 16:

       // Horizontal scroll bar exists?
        if(self.grid.$headerScroller.width() > self.grid.$headerContainer.width()){
            // Yes, so increase the height
            extraHeight += 17;
        }

ligh7beam avatar Jul 31 '14 14:07 ligh7beam