使用 jQuery 的甘特图
http://jsfiddle.net/JeaffreyGilbert/VkghS/
目前可以通过拖动 barWrap 来完成行之间的排序(灰色的)。可以通过拖动甘特条来移动甘特条。
我想要的是通过拖动栏可以立即完成排序和移动。如何实现这一目标?
任何帮助将不胜感激,谢谢。
http://jsfiddle.net/JeaffreyGilbert/VkghS/
Currently sorting between rows can be done by dragging barWrap (grey). To move gantt bar can be done by dragging the bar.
What I want is sorting and moving can be done at once by dragging the bar. How to achieve this?
Any helps would be appreciated, thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可排序的小部件具有句柄功能。所以:
编辑(见评论):你必须拿出可拖动的,在我看来这还不错,因为人们仍然可以使用可调整大小来改变位置。您可以尝试使用可拖动手柄来找到它们都可以工作的方法。
The sortable widget has a handle feature. So:
Edited (see comment): You have to take out the draggable, which IMO isn't so bad because people can still use resizable to change the position. You could experiment with draggable handles to find a method where they both work.
这是一个老问题,但您只需要添加另一个 div 包装器即可实现此目的(jsfiddle):
It's an old question, but you just need to add another div wrapper to achieve this (jsfiddle):