mipengine / mip

[Deprecated] 请查看 mip2
https://www.mipengine.org/
MIT License
380 stars 81 forks source link

feat: 优化 viewport 的 scroll, resize, changed 事件 #272

Closed xuexb closed 6 years ago

xuexb commented 6 years ago
  1. 由于 viewport.scroll 事件已经在使用,并且一些组件依赖该事件做一些悬浮元素处理,故该事件节流为 1000 / 60 ,对组件影响较小
  2. 由于刷新视图对 scroll 事件的周期要求不高(如不想滚动一次刷新100次,其实20次就够了),故使用 changed 事件,节流 200
  3. changed 事件文档调整,从之前的“低速滚动”触发变更为“浏览器滚动时低频率触发”

fix #267 , fix #266

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.09%) to 95.042% when pulling 5b5997e658d887484427171f64c6bff47a82d6cc on xuexb:fix/scroll into 2af390cf5f2fa4746efa212bd568230489cea144 on mipengine:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.09%) to 95.038% when pulling d955b3d64c1c0593d2a62e8b0cec905eedae570f on xuexb:fix/scroll into a957d308dcd8e7ec779bd781c44ad8517a26ad25 on mipengine:master.