LvHuaiSheng / leafer-x-ruler

leafer-ui的标尺线插件
http://leafer-x-ruler.sourcenet.cc/
MIT License
11 stars 5 forks source link

fix: 修复事件设置的bug #7

Closed foolishflyfox closed 4 days ago

foolishflyfox commented 4 days ago

修复事件绑定与解绑的bug。

  1. 绑定的是 LayoutEvent.AFTER,解绑的是 RenderEvent.AFTER
  2. 绑定时使用 Function.prototype.bind 函数,将产生新的函数,如果绑定和解绑都使用该函数产生新的回调函数,因为绑定与解绑的函数不同,不能实现解绑的效果