原型 UI - 具有拖放功能的轮播
有谁知道是否可以在原型中创建图像轮播,然后将这些图像从轮播拖放到可放置的 div 上?
我已经尝试使用 jQuery UI 的可拖放插件和 jCarousel 进行同样的操作,但没有成功。谢谢!
Does anyone know if it's possible to create a carousel of images in prototype and then drag+drop those images from the carousel onto a droppable div?
I've tried the same thing using jQuery UI's draggable/droppable plugins with jCarousel without luck. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为做到这一点的技巧是仔细管理轮播的遏制。我使用 Prototype/Scriptaculous 进行拖放的经验是,如果源包含在溢出设置为隐藏或滚动的元素中,则无法将其拖出。轮播通常包含在 div 中,并将溢出设置为隐藏,因此如果从一个图像移动到另一图像的动画不完全同步,则元素大小不会脉动。
一种选择是让您的轮播使用相同大小的图像,这些图像绝对定位到相同的坐标,并且简单地从一个淡出到下一个,那么遏制可以很简单(或者根本没有),然后是脚本拖/放应该可以正常工作。
I think the trick to doing this is to carefully manage containment of the carousel. My experience of Drag and Drop with Prototype/Scriptaculous has been that if the source is contained within an element with overflow set to hidden or scroll then you can't drag out of it. Carousels are often contained in div's with the overflow set to hidden so if the animations to move from one image to another are not perfectly in sync the element size doesn't pulse.
One option would be to have your carousel use equally sized images which are absolutely positioned, to the same co-ordinates, and simply fade from one to the next, then the containment can be simple (or have none at all), then the scripty drag/drop should work ok.