Make jQuery UI drag and drop when zoomed

I watched this trial version for jQuery UI. The demo works fine with normal scaling. But if you zoom out to say 50%, things get awkward. 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?

+6
source share
1 answer

As far as I know, browser scaling and javascript / jQuery do not play well. A decade and a half ago, scaling in the browser did not increase the image (at least in IE), etc.

http://bugs.jqueryui.com/ticket/4140 A problem arises here indicating that it is not possible to fix errors related to increasing errors that occur in jQuery. This is two years ago, but it says:

Unfortunately, I can’t accurately determine the scale of the page and its value in any browser, so I must close this ticket at the moment. If you find a way to detect it that does not cause significant overhead, please open it again.

I found that if you are in Google Docs and using browser zoom, a message will show a warning to the user that different zoom levels are not supported. Therefore, I believe that the best choice for you, if you want to fix it, is to do the same thing that Google does.

+3
source

Source: https://habr.com/ru/post/893319/


All Articles