dev-docs/RFCs/v5.0/break-out-event-manager-rfc.md
The Event Handling RFC that led to the development of the EventManager class starts with describing the duplicated event handling we have in deck.gl and react-map-gl, and in an extended sense in luma.gl.
It is obvious that EventManager could be of general interest (being a solid extension of Hammer.js that handles both touch gestures and pointer events, as well as other events in a unified, cross-browser architecture). So it seems reasonable that event-manager could deserve its own repository and module.
Naming: Proposal mjolnir.js - a kind of indirect homage to hammer.js.
Tests: already has a strong test suite
Documentation: Use ocular. Reference documentation partly in place. Some Usage docs would be good.
Examples: At least one example would be valuable that works on desktop and mobile.
Detailed scope: The initial breakout covers:
This should happen as soon as the new module is published.
Not formally a part of this RFC: Should MapControllers or related components be broken out, and how?
The biggest open question is perhaps how to handle the map controller pieces that are shared between deck.gl and react-map-gl. Having to regularly add fixes in two places is frustraing. But they are more special purpose than EventManager.
Not formally a part of this RFC: luma.gl could also use the new module.
The legacy event handling in luma.gl duplicates most of EventManager's functionality. At a time when we are facing concerns about the size of our framework stack, duplicated functionality is something we want to avoid.
Open Questions:
EventManager?addEvents interface - at least until we make a major luma.gl version bump?