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

fix(google-maps): hide info window node when opened with content #30392

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/google-maps/map-info-window/map-info-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ export class MapInfoWindow implements OnInit, OnDestroy {
// undefined. If that's the case, we have to allow it to open in order to handle the
// case where the window doesn't have an anchor, but is placed at a particular position.
if (this.infoWindow.get('anchor') !== anchorObject || !anchorObject) {
this._elementRef.nativeElement.style.display = '';
// If no explicit content is provided, it is taken from the DOM node.
// If it is, we need to hide it so it doesn't take up space on the page.
this._elementRef.nativeElement.style.display = content ? 'none' : '';
if (content) {
this.infoWindow.setContent(content);
}
Expand Down
Loading