yz3456
2024-03-30 c0702fb50443fb03a4f5a7beb127294a17fc1dcd
1
2
3
4
5
6
7
export function onLeftClick(mouseDownHandler) {
  return function onMouseDown(evt, ...args) {
    if (evt.type === 'mousedown' && evt.button === 0) {
      mouseDownHandler.call(this, evt, ...args)
    }
  }
}