-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add a rightclick handler for map interaction #58
Conversation
WIP: works for gnomic and polar projections Still missing calling the callback on long touch
The previous code was redrawing for each event. Meaning if the browser send 1 events every 10ms, virtualsky must be able to draw in 10ms or less to keep smooth. A small delay is introduced (20ms), so accumulated events can be dequeued between redraws.
Good work pludov. I'd almost be tempted to do some of this through a plugin to keep the main file size down for those who don't need a context menu. |
Having said that... I've just seen your comment on #25 (comment) and you are right that it solves that. |
@pludov Would you object to me renaming the |
No objection on my side !
Le 6 août 2019 14:54:19 GMT+02:00, Stuart Lowe <notifications@github.com> a écrit :
…
@pludov Would you object to me renaming the `rightclick` event as
`contextmenu` just to keep it matching with
https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event
?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#58 (comment)
--
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.
|
OK. I've made some changes and cleaned up the code a bit using jshint.com. Thanks for all your contributions @pludov! Make sure to update before making more changes. :) |
This PR adds a callback to get notified for right click in the map. The callback will receive an event object including the location of the click (RA, DEC) and the id of the closest marker if present.
This partially resolves issue #25 since it provides RA and DEC in the callback.