Skip to content

Commit c2e860d

Browse files
committed
feat(google-maps): Add map-info-window component
Fix lint errors for features missing in the info window component. Add comment to style to explain its function.
1 parent c3103dc commit c2e860d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/google-maps/map-info-window/assets/map-info-window.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Style to prevent info window content from displaying in the DOM, but instead
2+
// keeps it in the map.
13
.map-info-window-container {
24
.map-info-window-content {
35
display: none;

src/google-maps/map-info-window/map-info-window.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
19
import {
10+
ChangeDetectionStrategy,
211
Component,
312
ElementRef,
413
EventEmitter,
514
Input,
615
OnDestroy,
716
OnInit,
817
Output,
9-
ViewChild
18+
ViewChild,
19+
ViewEncapsulation,
1020
} from '@angular/core';
1121
import {BehaviorSubject, combineLatest, Observable, ReplaySubject, Subject} from 'rxjs';
1222
import {map, takeUntil} from 'rxjs/operators';
@@ -19,13 +29,16 @@ import {MapMarker} from '../map-marker/index';
1929
* @see developers.google.com/maps/documentation/javascript/reference/info-window
2030
*/
2131
@Component({
32+
moduleId: module.id,
2233
selector: 'map-info-window',
2334
template: `<div class="map-info-window-container">
2435
<div #infoWindowContent class="map-info-window-content">
2536
<ng-content></ng-content>
2637
</div>
2738
</div>`,
2839
styleUrls: ['./assets/map-info-window.css'],
40+
changeDetection: ChangeDetectionStrategy.OnPush,
41+
encapsulation: ViewEncapsulation.None,
2942
})
3043
export class MapInfoWindow implements OnInit, OnDestroy {
3144
@Input()

0 commit comments

Comments
 (0)