OpenGeoscience/geojs — pull request #210 by jbeezley (2014-10-11 22:47:22+00:00)
Title: Moving mouse handler out of gl

This moves `mapInteractorStyle` out of gl and simplifies much of the gl renderer codebase. The new interactor is customizable with different mouse button and keyboard modifiers and can be accessed through `map.interactor()`. The interactor provides the current mouse position over the map through `interactor.mouse().map`.

The interaction events now occur as follows:
1. Raw DOM events are captured by the interactor.
2. The interactor updates its internal state.
3. When appropriate, the interactor calls `map.center` or `map.zoom`.
4. The map center and zoom methods trigger geojs events on the base layer's renderer.
5. The base layer's renderer modifies the event as necessary. (i.e. It can block the event, if the zoom level is invalid.)
6. The map triggers the event on all layers.

The changes in this PR fix the following issues: #100, #142, #147, #163.