Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
end: () => {
return (
preventDefault &&
!preventDefaultExceptionFn(e.target, preventDefaultException)
)
},
move: () => {
if (!cancelable.preventClick) {
const _dblclick = this.options.dblclick
let dblclickTrigged = false
if (_dblclick && this.lastClickTime) {
const { delay = 300 } = _dblclick as any
if (getNow() - this.lastClickTime < delay) {
dblclickTrigged = true
dblclick(e)
}
}
if (this.options.tap) {
tap(e, this.options.tap)
}
if (
this.options.click &&
!preventDefaultExceptionFn(
e.target,
this.options.preventDefaultException
)
) {
click(e)
}
this.lastClickTime = dblclickTrigged ? null : getNow()
return true
}
return false
}
private beforeHandler(e: CompatibleWheelEvent) {
const {
preventDefault,
stopPropagation,
preventDefaultException
} = this.scroll.options
if (
preventDefault &&
!preventDefaultExceptionFn(e.target, preventDefaultException)
) {
e.preventDefault()
}
if (stopPropagation) {
e.stopPropagation()
}
}
private wheelMove(delta: { x: number; y: number }) {
private handleClick(e: TouchEvent) {
if (
!preventDefaultExceptionFn(e.target, this.options.preventDefaultException)
) {
e.preventDefault()
e.stopPropagation()
}
}