-
-
Notifications
You must be signed in to change notification settings - Fork 871
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
feat: add hit detection to Polyline
s
#1728
Conversation
Polyline
s tappable
Polyline
s tappablePolyline
s tappable
Polyline
s tappablePolyline
s tappable
@ignatz With all of that decided, it'd be great if you could fix the conflicts here, and just add Hugo's name to the top of the new code (in a comment or something) :) |
Also just need to confirm how this PR will interact with #1704, and which should be merged first. |
Help me out. What would you like me to write/credit? I'll put there whatever you'd like me to put. It's not like FM generally credits authors (which I like) nor is this code based on Hugo's code. I feel a bit silly to mention that there used to be an unrelated plugin that did something similar. |
Yeah, we don't normally credit code unless we're absorbing it. In this case, I feel like we should thank Hugo, just something like "Thanks to Hugo H for maintaining tappability until v7, now maintained here for flexibility". |
Sounds reaonsable if there was some sort oft absorbing happening. "Thanks to Hugo for maintaining tappability until v7, now maintained here for flexibility" feels misleading. It seems to imply a lineage where there's none. I also don't quite understand the flexibility argument. If at all, it might be worth pointing out to users that these are entirely separate implementations that behave semantically differently. |
I would agree that adding it on top of the implementation could be misleading. It makes sense to me if we want to hint that code got integrated to show the copyright but in this case it's different. 🤔 |
Ok, sure, we'll leave it out of here then, and add it to the docs site. |
c0b156d
to
1433b80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't experienced any bugs while testing. Thanks @ignatz for adding a nice showcase to the example app too.
Could you check my comments?
Although this is technically non-breaking, it will not be included in v6.1.0, because of its impact on the plugin. |
Hey @ignatz, would appreciate your thoughts if you have any! |
Sorry, on what specifically? I did express thoughts before. Would you like me to review the code? |
You're right, I just hoped that I've found a solution that isn't too messy. Just wanted to check with you that you couldn't see any glaring issues with this approach that I've missed. |
…f just `tapKey` Cleaned up Fixed bugs surrounding `onTap` variants Fixed bugs and removed unnecessary code surrounding the detection algorithm's duplication of results
Added equality methods to `Polyline`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad we argued. I think I like this better than my original proposal. Gives you all the flexibility w/o much complexity. Definitely let's me minimize my fork even more. Thanks
Ok, everything is ready for final review now :D I've also written the website documentation for interactivity: https://docs.fleaflet.dev/v/v7-beta/layers/polyline-layer#interactivity. Let me know if that seems suitable and comprehensive enough. |
Minor documentation improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only found some small suggestions. Up to you how and if you solve them.
Great work @JaffaKetchup and @ignatz!
Tested on windows and web, works like a charm.
Polyline
s tappablePolyline
s
Huge thanks @ignatz! Now on to polygons when you're ready and have had a break from me :D |
No description provided.