2011-04-21 25 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

相關問題