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

feat: added interactivity to CircleLayer & refactored interactivity out into seperate classes #1886

Merged
merged 8 commits into from
May 23, 2024

Conversation

JaffaKetchup
Copy link
Member

@JaffaKetchup JaffaKetchup commented May 19, 2024

Uses same framework as in PolylineLayer/PolygonLayer, but less complex (no pre-projection).

Additionally, to reduce duplication and make it easier to change behaviour in future, all these layers now use a single system, and are only made responsible for hit testing a single element (via an implemented method invoked by the shared hitTest implementation).

  • Basic implementation
  • Example
  • Testing

@JaffaKetchup JaffaKetchup marked this pull request as ready for review May 23, 2024 13:52
@JaffaKetchup JaffaKetchup changed the title feat: added interactivity to CircleLayer feat: added interactivity to CircleLayer & refactored interactivity out into seperate classes May 23, 2024
Copy link
Contributor

@josxha josxha left a comment

Choose a reason for hiding this comment

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

Could it be that the order of circles is reversed?
image

The only other thing I'd preferably change is the name of the layer/misc directory since it's now more a layer/common or layer/shared directory.
Other than that it looks good to me. Did some quick testing and all works like intended. Good job👍

Renamed 'layers/misc' to 'layers/shared'
@JaffaKetchup JaffaKetchup requested a review from josxha May 23, 2024 17:10
@JaffaKetchup
Copy link
Member Author

JaffaKetchup commented May 23, 2024

I believe it is working correctly. Like a Stack, the element at the bottom of the list is rendered on top, and this is reflected in the hit dialog in my testing. (Same as all the other layers, the transparency isn't properly supported by the painter, but this was intentional I believe to improve efficiency.)

I've renamed the directory to 'shared' :)

@JaffaKetchup JaffaKetchup requested a review from josxha May 23, 2024 21:39
Copy link
Contributor

@josxha josxha left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@JaffaKetchup JaffaKetchup merged commit 58ff560 into master May 23, 2024
7 checks passed
@JaffaKetchup JaffaKetchup deleted the circle-layer-interactivity branch May 23, 2024 21:41
@josxha josxha added this to the v7.0 milestone May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants