Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all user-initiated events should include originalEvent #1975

Closed
tmcw opened this issue Jan 22, 2016 · 3 comments
Closed

all user-initiated events should include originalEvent #1975

tmcw opened this issue Jan 22, 2016 · 3 comments

Comments

@tmcw
Copy link
Contributor

tmcw commented Jan 22, 2016

In order to determine the source of a map event, we need to specify originalEvent on any event initiated by a user.

@bhousel
Copy link
Contributor

bhousel commented Jan 22, 2016

I agree. Some work already started on this in #1969

I would need to add these to touch_zoom_rotate handler, and I'm also considering adding a param to the jumpTo/easeTo methods to be able to pass the original event info along to those methods which fire their own events. Thoughts?

When you say "all"... I'm assuming you don't mean things like when user uses the zoom in/out or rotate controls. We wouldn't want to propagate those click events, nor unproject and pass along the lng/lat underneath where the buttons happen to be.

@tmcw
Copy link
Contributor Author

tmcw commented Jan 22, 2016

An alternative idea is to create a way for API-initiated events to not fire events, or indicate their sourcing in the same way.

@bhousel
Copy link
Contributor

bhousel commented Jan 22, 2016

@tmcw can you review e585f88 and see if that would help. Going forward I'd like for all handlers to pass the original event source on to the camera methods. Alternatively if you call camera methods directly, you could pass your own sourcing data in that parameter, then watch for it in the receiving code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants