有问题的代码是用Visual Studio 2010 asp.net下的直接javascript编写的。
我正在将图形部件拖到图表上。 我使用拖动克隆。 当我单击其中一个图形时,代码将拖动克隆定位在该图形上,然后使拖动克隆可见。
问题是我第一次尝试拖动每个拖拽克隆, 如果我快速拖动并快速拖动 ,屏幕会在拖拽关闭出现的同时产生一个圆圈斜杠符号。 然后,阻力克隆会有些行为不端。
我花了一段时间才弄明白,但仔细观察,我发现在拖拽克隆之前出现了圆圈斜线。 然后,下面的两条评论解释了我是如何解决它的。
The code in question is written in straight javascript under Visual Studio 2010 asp.net.
I'm dragging graphic parts onto a diagram. I use drag clones. When I click on one of these graphics, the code positions the drag clone over that graphic and then makes the drag clone visible.
The problem was that the first time only I try to drag each drag clone, and if I mousedown and drag quickly, the screen would produce a circle-slash symbol at the same time the drag close appears. The drag clone would then misbehave somewhat.
It took me a while to figure out, but watching closely I saw that the circle-slash appeared before the drag clone. And then, the two comments below explain how I solved it.
最满意答案
我发现圆圈斜线是因为系统告诉我无法拖动静态“图部件”图形,即拖动克隆复制的图形。
并且静态图形开始拖动并生成圆斜杠的问题的解决方案是使其成为具有OnClientClick属性的ImageButton以停止回发,如下所示。 这些输入然后就像一个单独的那样是不可拖动的。
Use JQuery for drag and drop in javascript
更多推荐
发布评论