dbclick 在 Raphael.js 中不起作用
我有以下 JS 代码片段(使用 Raphael lib),并且双击不起作用 - 有人可以帮我解决为什么吗?
var paper = new Raphael(document.getElementById('canvas_container'), 600, 500);
var shape=[];
var shapefill=[];
shape[1] = paper.path('m150,150 l40,0 l0,20 l-40,0 l0,-20z');
shapefill[1]=toothsurface[1].attr({fill:'#FF33FF'})
shapefill[1].dbclick(function ()
{
window.location="http://127.0.0.1:8000/dbclick/";
});
注意:这与“shapefill[1].click(...);”完美配合
I have the following JS code fragment (using Raphael lib) and this double click does not work - does anybody can help me sort out why?
var paper = new Raphael(document.getElementById('canvas_container'), 600, 500);
var shape=[];
var shapefill=[];
shape[1] = paper.path('m150,150 l40,0 l0,20 l-40,0 l0,-20z');
shapefill[1]=toothsurface[1].attr({fill:'#FF33FF'})
shapefill[1].dbclick(function ()
{
window.location="http://127.0.0.1:8000/dbclick/";
});
note: this works perfectly well with a "shapefill[1].click(...);"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它应该是
dblclick
,而不是dbclick
来自 源代码,Raphael.js 支持以下事件 - click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchendorientationchange touchcancelgesturestartgesturechange手势结束
It should be
dblclick
, notdbclick
From the source, Raphael.js supports following events - click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend
您是指
dblclick
而不是dbclick
?Did you mean
dblclick
rather thandbclick
?