jQuery UI:将Selectable与Draggable相结合 [英] jQuery UI : Combining Selectable with Draggable

查看:123
本文介绍了jQuery UI:将Selectable与Draggable相结合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在试图了解jqueryUI的 selectable() draggable()组件如何协同工作时遇到了一个大问题。

I'm having a big problem trying to get my head round how the selectable() and draggable() components of jqueryUI can work together.

他们自己工作正常。我正在尝试创建一个文件浏览器类型界面,用户可以选择多个文件或将 INDIVIDUAL 文件拖到应用程序中的其他可放置位置。我知道很多人一直在寻找拖动多个文件的方法,但目前这不是我的要求。

They work fine on their own. I am trying to create a file browser type interface that users can select multiple files or drag INDIVIDUAL files to other droppable places in the app. I know a lot of people have been looking at ways to drag multiple files but this is not a requirement for me at the moment.

在提供的示例中,如果使用可选择的工作鼠标拖动选框框但不再适用于简单的鼠标单击或crl单击选择多个(启用拖动时)。

In the example provided selectable works if using the mouse drag marquee box but no longer works for simple mouse clicks or crl click to select multiple (when draggable is enabled).

示例:
http://jsbin.com/aguju4/3/edit

推荐答案

决定废弃可选插件并自行构建基本版本。这两个似乎并不顺利。我基于live()点击建立了自己的可选解决方案,这样它就不会与可拖动的点击事件冲突。

Decided to scrap the selectable plugin and build a basic version myself. The two don't seem to get on very well. I have based my own selectable solution on live() clicks so that it doesn't conflict with the draggable click events.

这篇关于jQuery UI:将Selectable与Draggable相结合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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