You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: make pointer events more robust
* feat(advanced-marker): add anchorLeft and anchorTop props
Adds support for the 'anchorLeft' and 'anchorTop' properties on the AdvancedMarker component. This provides a more direct way to control the anchor point of the marker, especially with modern versions of the Google Maps JavaScript API.
The implementation includes:
- A new internal 'useAdvancedMarkerAnchorPoint' hook to encapsulate anchoring logic.
- Version detection to use native 'anchorLeft'/'anchorTop' properties on Google Maps API v3.62+ and fallback to a CSS transform on older versions.
- A warning is logged when using the new props on unsupported API versions.
- Added TypeScript definitions of anchor options to type augmentation
- Added API documentation.
* test(advanced-marker): add anchor prop tests
Adds a suite of tests for the anchor-related props ('anchorLeft', 'anchorTop', and 'anchorPoint') on the AdvancedMarker component.
This suite covers:
- Precedence of 'anchorLeft'/'anchorTop' over 'anchorPoint' on modern APIs.
- Correct fallback to 'anchorPoint' on modern APIs.
- Correct application of 'anchorPoint' via CSS transform on legacy APIs.
- Warning generation when using modern props on legacy APIs.
- Snapshot testing for console warnings.
* feat(advanced-marker): deprecate anchorPoint prop
Marks the 'anchorPoint' prop as deprecated in favor of the 'anchorLeft' and 'anchorTop' props.
- Adds a '@deprecated' JSDoc tag to the 'anchorPoint' prop.
- Adds a TODO comment to add a console warning in a future version.
* fix: restrict event-handling hacks to custom anchoring
---------
Co-authored-by: Martin Schuhfuss <[email protected]>
0 commit comments