jQuery UI 可排序容差选项未按预期工作 [英] jQuery UI sortable tolerance option not working as expected

查看:19
本文介绍了jQuery UI 可排序容差选项未按预期工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是 jQuery UI 文档的一部分,用于 tolerance 选项:

Here is the part from jQuery UI documentation for the tolerance option:

这是在拖动期间重新排序的行为方式.可能的值:相交",指针".在某些设置中,指针"更自然.

This is the way the reordering behaves during drag. Possible values: 'intersect', 'pointer'. In some setups, 'pointer' is more natural.

intersect:draggable 与 droppable 重叠至少 50%

intersect: draggable overlaps the droppable at least 50%

默认为intersect,但如果鼠标指针不在可排序项的上方,则排序不会发生,无论拖动的元素是否至少超过另一个可排序项的 50%(我期望的功能)这也发生在演示页面上(上面链接)

The default is intersect, but if the mouse pointer is not above the sortable items, the sort does not happen, no matter that the dragged element is at least 50% over another sortable item (the functionality I expect) This happens on the demo page as well (linked above)

这是 jQuery UI 中的错误,还是我理解错误?

Is this a bug in jQuery UI, or am I understanding it wrong?

推荐答案

这与您在 IE9、FF11 和 Chrome18 中描述的完全一样.

This happens exactly as you described in IE9, FF11 and Chrome18.

当鼠标至少高于 50% 时相交重叠.
我认为这是不正确的文档.

Intersect overlaps when mouse is at least 50% above.
I think this is the documentation who is not correct.

我在 JQuery Bugtracker 中没有发现与此相关的错误.

I found no bug related to this in JQuery Bugtracker.

这篇关于jQuery UI 可排序容差选项未按预期工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆