0

私は Raphael.js でこのコードを持っています:

var set = paper.set();
// ... here push some elements to set: path, circles, etc.
set.mousedown(function() { ... });
set.mousemove(function() { ... });
set.mouseup(function() { ... });

すべてが正常に機能します...しかしunbind .mousemove、「セット」でイベントを実行する方法はbind?

4

1 に答える 1

0

unイベント名の前に追加http://raphaeljs.com/reference.html#Element.unmousemove

// Pass the handler to install it
set.mousemove(handler);
// Pass the same handler to remove it
set.unmousemove(handler);

Raphael JS:イベントを削除するには?

ハンドラーを削除するときに関数への参照を渡す必要があるため、匿名関数を渡すことはできません。

于 2013-05-07T19:19:56.673 に答える