yz3456
2024-07-09 32148fb89c6cbedc24aaf9cb93a215a6cc665f2b
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)
    }
  }
}