2011-04-21 28 views
2

我有以下JS代码片段(使用Raphael lib),并且此双击不起作用 - 有人可以帮我理清原因吗?dbclick在Raphael.js中不起作用

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(...)”非常吻合;“

回答

2

应该dblclick,不dbclick

source,Raphael.js支持下列事件 - 点击鼠标按下DBLCLICK鼠标移动鼠标移开鼠标悬停鼠标松开touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend

+0

谢谢,是的,当然你是对的, – Borys 2011-04-21 15:50:44

2

你的意思dblclick而不是dbclick

相关问题