未验证 提交 415506bf 编写于 作者: Y Yopai 提交者: GitHub

README : trick for emptyInsertThreshold

Give a pure-css workaround to emptyInsertThreshold option.
上级 e83eb7ee
......@@ -521,6 +521,19 @@ The distance (in pixels) the mouse must be from an empty sortable while dragging
Demo: https://jsbin.com/becavoj/edit?js,output
Instead of this, you can just set a padding on your list when it is empty. Warning, for :empty to work, it must have no node inside (even text one).
(It will help if your lists are side-by-side, since you only want the drag occurs when you are under the list - not at the left)
Adding a CSS rule :
`ul:empty {
background:pink;
padding-bottom:3em;
}`
And rewriting the empty list as : `<ul id="list2" class="list-group"></ul>` (so that it is really empty)
You got :
https://jsbin.com/galujuvayi/edit?html,css,js,output
---
### Event object ([demo](https://jsbin.com/fogujiv/edit?js,output))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册