onPosChange(e.x, e.y)}
  on:mousedown={(e) => {
    isDown = true
    onPosChange(e.clientX, e.clientY)
  }}
  on:mousemove={(e) => {
    if (isDown) {
      onPosChange(e.clientX, e.clientY)
      e.preventDefault()
    }
  }}
  on:mouseup={() => {
    isDown = false
  }}
  on:touchmove={(e) => {
    onPosChange(e.touches[0].clientX, e.touches[0].clientY)
    e.preventDefault()
  }}
  on:touchstart={(e) => onPosChange(e.touches[0].clientX, e.touches[0].clientY)}
>