在 jQuery 中,如何在同时使用 resizable() 和 draggable() 时修复包含错误? [英] In jQuery, How to fix containment bug when using resizable() and draggable() simultaneously?

查看:13
本文介绍了在 jQuery 中,如何在同时使用 resizable() 和 draggable() 时修复包含错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 jQuery 中,当同时使用 resizable() 和 draggable() 时,如何修复包含错误?如果您在同一个对象上使用 draggable,似乎可调整大小的容器的左偏移和顶部偏移是错误的.我在谷歌上查了这个,有几个人有同样的问题,但没有答案.如果有人能帮忙就太好了,这让我发疯了!!

In jQuery, How do you fix containment bug when using resizable() and draggable() simultaneously? It seems as though the left offset and top offset of the containment for resizable is buggy if you use draggable on the same object. I have looked this up on google and a few people had the same problem, but no answers. If anyone could help it would be great, this is driving me nuts!!

这是一个例子:http://www.fissiondesigns.com/simon/

尝试调整图像上某个框的大小.谢谢!

Try resizing one of boxes on the image. Thanks!

推荐答案

看看这个bug.最后一条评论讨论了修复,因此您可以尝试一下,看看它是否有帮助.它讨论了顶部/左侧定位的问题.我在可滚动的 div 中使用 resizable 时遇到了类似的问题,这解决了我使用的问题(使用 1.7.3).

Have a look at this bug. The last comment discusses a fix, so you might try it and see if it helps. It discusses an issue with top/left positioning. I had a similar issue using resizable within a scrollable div and this fixed the problem for my use (using 1.7.3).

ui.resizable - 滚动跳转

这篇关于在 jQuery 中,如何在同时使用 resizable() 和 draggable() 时修复包含错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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