feige
2024-03-01 dc2b637e3ead569adee4cf7a48b0bb15f8c7aa43
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)
    }
  }
}