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

Apply dashed line hit detection to all geometry types #14938

Merged
merged 4 commits into from
Aug 4, 2023

Conversation

mike-000
Copy link
Contributor

@mike-000 mike-000 commented Jul 23, 2023

Fixes #14936

Previously only LineString geometry was hit detected between dashes. A MultiLineString with similar coordinates would not (although using the previous test for LineString would have not have noticed that as it was hitting the rounded end of a dash).

This applies the same logic to LineString and MultiLineString, plus Polygon, MutiPolygon and Circle geometry outlines, and sets the test resolution and geometry coordinates to match the dash intervals to ensure a meaningful test with hits midway between dashes.

Vector layer hit detection already had this behaviour, so map and vector layer hit detection will now be consistent.

@github-actions
Copy link

📦 Preview the website for this branch here: https://deploy-preview-14938--ol-site.netlify.app/.

@mike-000 mike-000 marked this pull request as ready for review July 23, 2023 15:36
Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note about this change to the upgrade notes

Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @mike-000

@ahocevar ahocevar merged commit 220efd2 into openlayers:main Aug 4, 2023
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

Successfully merging this pull request may close these issues.

Extend #11805 / #11874 hit detection to polygons and circles
2 participants