使用clone进行拖放会产生圆斜杠(Drag and Drop with clone produces circle

编程入门 行业动态 更新时间:2024-10-10 23:17:29
使用clone进行拖放会产生圆斜杠(Drag and Drop with clone produces circle-slash)

有问题的代码是用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

更多推荐

本文发布于:2023-04-29 01:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1334420.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:斜杠   拖放   clone   Drag   circle

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!