When using this library along with mapbox-gl-draw it's not possible to listen to the draw events currently. Whilst I appreciate not supporting all the events, I think it should be possible to support additional events by allowing a user to pass an object of additional event mappings.
Alternatively, you could support any other key that doesn't have a mapping by automatically "guessing" a mapping, e.g., drawSelectionchangedraw.selectionchange by replacing uppercase letters with lowercase ones preceded by a period (should be possible with a little str.replace(regex, fn))
This would allow better deeper integration with the entire mapbox-gl ecosystem.
I'd be happy to help write a PR if this feature is acceptable.
When using this library along with mapbox-gl-draw it's not possible to listen to the draw events currently. Whilst I appreciate not supporting all the events, I think it should be possible to support additional events by allowing a user to pass an object of additional event mappings.
Alternatively, you could support any other key that doesn't have a mapping by automatically "guessing" a mapping, e.g.,
drawSelectionchange
draw.selectionchange
by replacing uppercase letters with lowercase ones preceded by a period (should be possible with a littlestr.replace(regex, fn)
)This would allow better deeper integration with the entire mapbox-gl ecosystem.
I'd be happy to help write a PR if this feature is acceptable.