feige
2024-05-18 70b82496c025c1a8a825e74a1dd3b80d9e73adb7
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)
    }
  }
}