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

Add function for mouseover lines #19

Open
oijkn opened this issue Apr 30, 2019 · 2 comments
Open

Add function for mouseover lines #19

oijkn opened this issue Apr 30, 2019 · 2 comments

Comments

@oijkn
Copy link

oijkn commented Apr 30, 2019

Hello,

With the current code we can use the mouseover function on the circleMarkers, origin and destination points but it's impossible to have this feature for the lines.

Could you add this feature, please ?

Thank you for your support.

@jwasilgeo
Copy link
Owner

I don't know yet if that will be possible without substantial additional work. But, I welcome pull requests with code enhancements to support this!

The lines are drawn in a pure <canvas> that is handled outside of LeafletJS. Any user interaction events for the bezier lines would require some research and likely writing a bit of new code.

@jwasilgeo
Copy link
Owner

There's been some more interest shown in supporting this enhancement. Here are some more notes in case I or anyone else ends up researching this some more.

Might want to look into: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D#Hit_regions (but they're experimental)

Also might be useful to find out how LeafletJS source code to see how they wired up mouse interactions, popups, tooltips, etc. when they render features on the canvas.

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

No branches or pull requests

2 participants