dojo.dnd.move节点渲染问题
Dojo 有一个基本问题,除其他外,它的 dojo.dnd.move 类。您可以在这里看到的问题:
http://archive.dojotoolkit .org/nightly/dojotoolkit/dojo/tests/dnd/test_parent_constraints.html
是当您单击一个节点并开始拖动时,节点本身跳转。它实际上移动了它的位置。这是一个非常有问题的问题,我想知道是否有人以前见过这种情况。
我正在创建一个需要移动节点的应用程序,但它需要精确,因此不能进行初始跳转。
任何帮助将不胜感激。
Dojo has a basic issue, amongst other things... with its dojo.dnd.move class. The issue which you can see here:
http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/tests/dnd/test_parent_constraints.html
Is that when you click on a node, and start dragging, the node itself jumps. It actually moves its position. This is extremely problematic and I was wondering if anyone has seen this happen before.
I am creating an application that requires the moving of nodes but it needs to be precise and thus can't have the initial jump.
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是由 Mover.js 中以下突出显示的代码引起的:
https://github.com/dojo/dojo/blob/master/dnd/Mover.js#L91-92
奇怪的是,根据评论,这段代码似乎导致 /em> 的这是它旨在防止的问题。
也就是说,如果您的正文的样式应用了
padding: 0
,则此代码不会影响您。 (您可以在拖动之前在控制台中运行document.body.style.padding = "0"
来在该测试页上进行测试。)您可能需要在 Dojo bug 跟踪器上输入一个票证 < a href="http://bugs.dojotoolkit.org" rel="nofollow">http://bugs.dojotoolkit.org (或者搜索并查看是否已输入)。
This is caused by the following highlighted code in Mover.js:
https://github.com/dojo/dojo/blob/master/dnd/Mover.js#L91-92
The odd thing is, based on the comments, it seems like this code is causing the very problem it aims to prevent.
That said, if your body has
padding: 0
applied to its style, this code shouldn't affect you. (You can test it on that test page by runningdocument.body.style.padding = "0"
in the console before dragging.)You might want to enter a ticket on the Dojo bug tracker at http://bugs.dojotoolkit.org (or maybe search and see if one has already been entered for it).