Angular-gridster2: Not detect window resize

Created on 31 Mar 2019  路  2Comments  路  Source: tiberiuzuld/angular-gridster2

Hello,

i am using your lib with following options:

  itemChangeCallback: this.itemChange.bind(this),
  itemResizeCallback: this.itemResize.bind(this),
  gridType: GridType.VerticalFixed,
  displayGrid: DisplayGrid.OnDragAndResize,
  setGridSize: true,
  fixedRowHeight: 16,
  margin: 5,

But the grid isn't resizing if container or windows is resized.

question

Most helpful comment

I have the same issue with setGridSize: true, I know that by now this is its normal behaviour, but I'd really need this feature to recalculate the grid size each time the "resize()" method on the grid component is invoked.
Is there a way we could achieve that? @tiberiuzuld
Thanks

All 2 comments

I have the same issue with setGridSize: true, I know that by now this is its normal behaviour, but I'd really need this feature to recalculate the grid size each time the "resize()" method on the grid component is invoked.
Is there a way we could achieve that? @tiberiuzuld
Thanks

Hi @flobiber & @julsette ,
How the option says setGridSize | sets grid size depending on content it will not change size depending on the outside container or window.
All the rest of the options will be calculated depending on the container size but with this option it will be reverse.
This option is best to be used with fixed grid type.
But if you want you can try to call this.options.api.resize() each time the container changes the size or window. Don't know if it will work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaiGhoneem picture MaiGhoneem  路  4Comments

jayoma picture jayoma  路  3Comments

Abdullah-96 picture Abdullah-96  路  5Comments

tiberiuzuld picture tiberiuzuld  路  3Comments

matpag picture matpag  路  3Comments