tiberiuzuld / angular-gridster2

Angular gridster 2
https://tiberiuzuld.github.io/angular-gridster2
MIT License
1.28k stars 376 forks source link

Detect full grid #324

Closed dcp3450 closed 6 years ago

dcp3450 commented 6 years ago

Look through the API, is there an event that tell me if I've filled all of the col/rows that are visible? I have gridster set to load a specific number and not load any more. However, when I add a new element to the grid it's hidden form the user.

If I can detect that an element won't fit I can display a message than the user needs to remove items.

tiberiuzuld commented 6 years ago

No there is not. I suggest doing a for loop and check when is full. Before adding a elemt that doesn't fit. Or use the getNextPossiblePosition

dcp3450 commented 6 years ago

Perfect running getNextPossiblePosition before add a new element allows for me to do this. Exactly what I needed.