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

Grid not recalculating height

Open blubberbo opened this issue 8 years ago • 1 comments

I am experiencing an issue with the grid not recalculating its height when an item is added, removed or moved and the number of rows should change. Unfortunately, my application is such that I cannot easily reproduce the issue in a public plunkr, but I have taken a series of screenshots (see below) to demonstrate the issue:

  1. Items laid out in 2 rows: grid-height-1

  2. 1 Item is dragged to a third row: grid-height-2

  3. When that item is then dragged back to the second row, the grid height is not recalculated and, instead, the whitespace of the third row remains: grid-height-3

My grid config is as follows:

 'margins': [5],            
        'draggable': true,       
        'resizable': false,        
        'max_cols': 4,          
        'max_rows': 0,              
        'visible_cols': 0,         
        'visible_rows': 0,          
        'min_cols': 1,            
        'min_rows': 1,              
        'col_width': 2,           
        'row_height': 2,          
        'cascade': 'up',            
        'min_width': 50,         
        'min_height': 5,         
        'fix_to_grid': false,      
        'auto_style': true,       
        'auto_resize': true,      
        'maintain_ratio': false,    
        'prefer_new': true,        
        'limit_to_screen': true,   
        'zoom_on_drag':false

The correct and expected behavior can be seen here: https://bmorton.co.uk/angular/ although I cannot duplicate the behavior I am experiencing on that demo.

I am using Angular 2.0.1 and my version of Angular2-Grid is 2.0.1 as seen here: https://www.npmjs.com/package/angular2-grid

blubberbo avatar Feb 27 '17 22:02 blubberbo

Hmm, that's an interesting one. I'll try to look into it further but when I try to reproduce your config on the demo I get very unusual results, which means there's probably more issues I need to look into...

BTMorton avatar Mar 05 '17 12:03 BTMorton