Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Svg 在iPad上,raphael元素mouseover、mouseup、mouseout事件不起作用_Svg_Raphael_Mouseover_Jquery Ui Draggable_Jquery Events - Fatal编程技术网

Svg 在iPad上,raphael元素mouseover、mouseup、mouseout事件不起作用

Svg 在iPad上,raphael元素mouseover、mouseup、mouseout事件不起作用,svg,raphael,mouseover,jquery-ui-draggable,jquery-events,Svg,Raphael,Mouseover,Jquery Ui Draggable,Jquery Events,我已经在rapahel元素上设置了mouseover、mouseup、mouseout事件,它监听jquerydraggable拖动的jquerydrag元素 this.elem.mouseover(this.handleMouseOver ); this.elem.mouseout( this.handleMouseOut ); this.elem.mouseup( this.handleMouseUpOver ); handleMouseOver : function(e) { }, ..

我已经在rapahel元素上设置了mouseover、mouseup、mouseout事件,它监听jquerydraggable拖动的jquerydrag元素

this.elem.mouseover(this.handleMouseOver );
this.elem.mouseout( this.handleMouseOut );
this.elem.mouseup( this.handleMouseUpOver );

handleMouseOver : function(e) {
},
....
对于其他两个处理程序也是如此

它在桌面浏览器上运行良好,但当我在ipad/iphone上拖动raphael元素上的文本时,上述事件似乎都没有发生

是否需要添加任何设置或自定义代码以使其正常工作

更新-
我尝试附加touchstart和touchend事件,但如果我处于拖动事件的中间,这些事件不会被触发

好的,对于Raphael,使用以下命令实现您自己的拖动:Element.dragmove,start,up ref:。原因是根据我自己的经验,jQuery UI拖动事件对于Raphael DOM不稳定

移动=…-更新中缝元素的x、y位置 开始=…-概述raphal元素检查元素是否已处于活动状态 向上=…-删除Raphael元素的轮廓可选:分离侦听器
注意:IOS touch会触发两次鼠标向下移动,因此需要进行两次检查以避免出现这种情况。不确定IOS 8是否也会这样做

想知道ipad上是否需要touchevents?我尝试绑定touchstart和touchend,但因为拖动事件已经开始,它在raphael元素上没有检测到。我会解决这个问题的issue@AlvinK. 我已经在使用它来拖动元素了,它在拖动非raphael元素时工作得很好。问题在于raphael元素无法检测其上的丢弃事件。我尝试在raphael元素上添加touchstart、touchend,但不起作用。如果我理解正确,您建议将raphael元素用于我正在拖动的元素。当前是它的HTML元素,我将其拖到raphael元素上。假设我使用raphael元素将其拖放到另一个raphael元素上,我将如何检测在哪个元素上调用drop事件。raphael也处理所有这些。Quote:…当元素将被拖动到另一个元素上时,拖动.over。也将被解雇。