ustbhuangyi / better-scroll

:scroll: inspired by iscroll, and it supports more features and has a better scroll perfermance

Home Page:https://better-scroll.github.io/docs/en-US/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[New Feature] 如果子元素可拖动会冲突

s97712 opened this issue · comments

commented

What problem does this feature solve?

拖动子元素时画布会跟着一起拖动

screenity.6.webm

建议增加一个选项,判断 ev.target === ev.currentTarget 成立时才允许拖动,避免和子元素冲突

What does the proposed API look like?

增加选项控制什么时候允许滚动

allowScroll: (ev: MouseEvent)=>boolean