s-yadav / angulargrid

Pinterest like responsive masonry grid system for angular
MIT License
277 stars 105 forks source link

Disable grid layout when only one column is present. #119

Open antisilent opened 7 years ago

antisilent commented 7 years ago

In the case of a single column grid, positions don't need to be set because this will presumably be handled naturally (a single column grid is just a column, as mentioned in #116). Initializing cssObj with null default values and then only setting them in the case of multiple columns would satisfy this requirement, and allows the grid to enable and "disable" itself automatically on window resize (it's not actually disabling itself, because it's still watching, but it disables/removes any positioning that Angulargrid would do or had already done).