Do you know what algorithms are behind gridster/masonry/gridstack?
Concrete example : http://troolee.github.io/gridstack.js/demo/float.html
You can place DIVs anywhere on the grid and the grid is extended dynamically. Also there are collisions, the positions are fixed and the DIVs are resizable and they snap to a specific cell width/height. How is that done?