‘liusuyi’
2023-08-09 72906ef43acb9b3d32816ae7037753d0c14805bf
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)
    }
  }
}