pex-gl / pex-cam

Cameras models and controllers for 3D rendering in PEX.
MIT License
2 stars 3 forks source link

Add wheelPreventDefault, min/max lat/lon options #17

Closed dmnsgn closed 4 years ago

vorg commented 4 years ago

@dmnsgn so i got merge error as i implemented the same thing with preventDefault but slightly different. I check if zoom happened (if it's enabled basically) and always cancel. So disabling zooming enables scrolling. Are there cases where you would like to zoom and scroll at the same time?

Screenshot 2020-09-24 at 14 18 03
vorg commented 4 years ago

TBH i should probably invert return value to

if (scroll(e.deltaY) === true) { //did zoom
  e.preventDefault()
  return false
}
vorg commented 4 years ago

published as 2.8.0 with wheelPreventDefault removed as i now call e.preventDefault automatically if zoom is enabled