使 Jquery UI 在缩小时可以拖放

发布于 2024-11-25 16:34:13 字数 392 浏览 1 评论 0原文

我正在查看 Jquery UI 的拖放演示。该演示在正常变焦下运行良好。但如果缩小到 50%,事情就会变得不稳定。 http://www.elated.com/res/File/articles/development/javascript/jquery/drag-and-drop-with-jquery-your-essential-guide/card-game.html

任何人都可以建议一种方法吗修复演示?

I was looking at this drag and drop demo for Jquery UI. The demo works fine at a normal zoom. But if you zoom out to say, 50%, things get wonky. http://www.elated.com/res/File/articles/development/javascript/jquery/drag-and-drop-with-jquery-your-essential-guide/card-game.html

Can anyone suggest a way to fix the demo?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不寐倦长更 2024-12-02 16:34:13

据我所知,浏览器缩放和 javascript/jQuery 效果不佳。五年前,在浏览器上缩放并不能缩放图像(至少在 IE 中)等。

http ://bugs.jqueryui.com/ticket/4140 这里有一个问题表明没有办法修复 jQuery 中出现的与缩放相关的错误。这是两年前的事,但它说:

不幸的是,据我所知,在任何浏览器中都无法可靠地检测页面缩放及其值,因此我现在必须关闭此票证。如果您找到一种不会造成大量开销的检测方法,请重新打开。

我发现,如果您在 Google 文档中并且使用浏览器缩放,则会显示一条消息,提醒用户不支持不同的缩放级别。所以我认为,如果你想解决这个问题,最好的选择就是做谷歌正在做的同样的事情。

As far as I know, browser zooms and javascript/jQuery don't play nice. A half a decade ago, zooming on the browser didn't zoom images (at least in IE), etc.

http://bugs.jqueryui.com/ticket/4140 Here's an issue suggesting that there's no way to fix zoom-related bugs that arise in jQuery. It's from two years ago, but it says:

Unfortunately it is impossible to my knowledge to reliably detect the page zoom and its value in any browser, so I have to close this ticket for now. If you find a way to detect it that doesn't cause significant overhead, please reopen.

I found that if you're in Google Docs and you use the browser zoom, an message will show alerting the user that different zoom levels are not supported. So I think the best choice for you, if you wanted to fix this, would be to do the same thing that Google is doing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文