-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(google-maps): Add methods and event handling to Google Map #16804
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
Conversation
This comment has been minimized.
This comment has been minimized.
]); | ||
const mouseEventHandlers = new Map<string, EventEmitter<google.maps.MouseEvent>>([ | ||
['dblclick', this.mapDblclick], | ||
['mousemove', this.mapMousemove], |
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.
Is the mousemove
handler running inside the Angular zone? This might be one where we want to special case to run outside if so, otherwise we could end up running change detection hundreds of times if someone mouses over the map.
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.
My thoughts on this are that I don't think that this is behaving any differently than angular's native mousemove event, which does cause change detection every time, and makes the user handle it, either by using OnPush or by manually having them run events outside of the Angular zone. My preference would be to do the same, especially since I can imagine a situation where someone has a simple app where they do want change detection to run every time (such as displaying the current lat/lng of the mouse cursor).
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.
That's fair
Add support for Google Maps event handlers, properties, and methods to the Google Map component, including click handlers, methods to pan with the map and access to the controls and data properties.
Change event names so they will not collide with native angular events.
Add jsdoc and comments to new events, methods, and properties.
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
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Add support for Google Maps event handlers, properties, and methods to
the Google Map component, including click handlers, methods to pan with
the map and access to the controls and data properties.