Make gridster.js tiles stick in specific grid posi

2019-04-04 08:49发布

is there any way to make Gridster.js tile(s) stick, that is not move up vertically to fill empty space. Kind of like the way a layout program with snap-to-grid turned on works...

4条回答
Ridiculous、
2楼-- · 2019-04-04 09:26

You may also be interested in the following prototype from my team: https://github.com/ibmjstart/gridplumb

Specifically, the modifications to grister can be found at https://github.com/ibmjstart/gridplumb/blob/master/src/extend-gridster.js

查看更多
Root(大扎)
3楼-- · 2019-04-04 09:28

My answer is not directly linked to gridster but to one of its fork : gridstack. I post this answer as I found this topic while searching for this functionality in gridstack.

So in gridstack solution is to put this property in grid options :

float:true
查看更多
看我几分像从前
4楼-- · 2019-04-04 09:30

Have you tried packery? http://packery.metafizzy.co/ This library has many drag and drop features.

查看更多
贼婆χ
5楼-- · 2019-04-04 09:37
登录 后发表回答