Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use pointer events #1840
This pull request bases the internal event system of OpenLayers on pointer events.
So far, there were separate interactions for touch and mouse events. Now, the interactions only receive pointer events. These pointer events are generated from a
All existing interactions have been ported to pointer events. The modify and draw feature interaction have been adapted by @ahocevar.
I just have a comment on the naming of interactions.
Up to now we've used names like DoubleClickZoom, where DoubleClick is the gesture and Zoom is the action performed on that gesture. And we still have interactions following that naming convention: DoubleClickZoom, DragRotate, etc.
So to continue using that convention I would suggest to rename Pan to DragPan, Zoom to PinchZoom, and Rotate to PinchRotate.
(I know Select, Draw, and Modify do not follow that convention, but they're also more complex/rich interaction.)
"pointerdown" (non-prefixed) should be added to this list https://github.com/tsauerwein/ol3/blob/pointerevents/src/ol/map.js#L259-264.