angular2-grid
angular2-grid copied to clipboard
auto_resize, width and height
I have a simple grid inside a container.
_________________________________
| |
| H E A D E R |
|________________________________|
| | |
| M | |
| E | |
| N | G R I D |
| U | |
| | |
| | |
________________________________
visible_cols: 2,
visible_rows: 1,
col_width: 200,
row_height: 450,
everything is displayed as expected.
If auto_resize: true is added, the width of each col is calculated correctly respecting the width of the menu. But the height calculation ignores the height of the header - it uses the window height.
A short code inspection shows that
max width is calculated by
var maxWidth: number = this._ngEl.nativeElement.getBoundingClientRect().width;
max height is calculated by
var maxHeight: number = window.innerHeight - this.marginTop - this.marginBottom;
Is this intended? Why is window.innerHeight used instead of the grid elements height?