tiberiuzuld/angular-gridster2

How to have scroll in the gridster while keeping the grid size

Opened this issue · 0 comments

When I have several gridster items a scroll appears, that is to say when I go beyond the 12 stable rows and by positioning more items and there is more scroll up to 24 rows each square is resized, that is to say each gridster item is resized. What I want is that the size of each square remains always the same, no matter how many rows it has and how much scroll there is, I don't want it to be out of shape.

 <div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
      <gridster [options]="options">
          <gridster-item> </gridster-item>
      </gridster>
  </div>

These are the options that I pass to create the gridster:

 this.options = {
     gridSizeChangedCallback: this._gridSizeChanged,
     gridType: GridType.ScrollVertical,
     compactType: CompactType.None,
     margin: 20,
     outerMargin: false,
     outerMarginTop: null,
     outerMarginRight: null,
     outerMarginBottom: null,
     outerMarginLeft: null,
     mobileBreakpoint: 640,
     minCols: 24,
     maxCols: 24,
     minRows: 12,
     maxRows: 24,
     maxItemCols: 100,
     minItemCols: 2,
     maxItemRows: 100,
     minItemRows: 2,
     maxItemArea: 2500,
     minItemArea: 1,
     defaultItemCols: 2,
     defaultItemRows: 2,
     fixedColWidth: 90,
     fixedRowHeight: 90,
     keepFixedHeightInMobile: true,
     keepFixedWidthInMobile: false,
     scrollSensitivity: 10,
     scrollSpeed: 20,
     enableEmptyCellClick: false,
     enableEmptyCellContextMenu: false,
     enableEmptyCellDrop: false,
     enableEmptyCellDrag: false,
     emptyCellDragMaxCols: 50,
     emptyCellDragMaxRows: 50,
     ignoreMarginInRow: false,
     draggable: {
       enabled: false,
     },
     resizable: {
       enabled: false,
     },
     swap: false,
     pushItems: true,
     disablePushOnDrag: false,
     disablePushOnResize: false,
     pushDirections: { north: true, east: true, south: true, west: true },
     pushResizeItems: false,
     displayGrid: DisplayGrid.None,
     disableWindowResize: false,
     disableWarnings: false,
     scrollToNewItems: false
   };

I want to keep always the size with cols as 24 and rows from 12 to 24, here is the problem. I start with 12 rows and when I create more gridster elements below these 12 rows the scroll appears but the size of the gridster changes, and also the size of the gridster element changes, as well as each square box.

I have tried changing the gridType with fit and fixed and it keeps resizing every time a new line is added.