[英]Raphael.js: How to unbind mousemove on set()?
我在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
对“ set”的.mousemove
事件bind
并再次bind
?
在事件名称http://raphaeljs.com/reference.html#Element.unmousemove之前添加un
// Pass the handler to install it
set.mousemove(handler);
// Pass the same handler to remove it
set.unmousemove(handler);
您不能像以前那样传递匿名函数,因为在删除处理程序时必须传递对该函数的引用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.