Skip to content

Commit

Permalink
fix(SebmGoogleMapMarker): fix private member state
Browse files Browse the repository at this point in the history
  • Loading branch information
sebholstein committed Oct 23, 2016
1 parent d625ab6 commit 648856d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/core/directives/google-map-marker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ export class SebmGoogleMapMarker implements OnDestroy, OnChanges, AfterContentIn
*/
mouseOut: EventEmitter<MouseEvent> = new EventEmitter<MouseEvent>();

@ContentChild(SebmGoogleMapInfoWindow) private _infoWindow: SebmGoogleMapInfoWindow;
/**
* @internal
*/
@ContentChild(SebmGoogleMapInfoWindow) infoWindow: SebmGoogleMapInfoWindow;

private _markerAddedToManger: boolean = false;
private _id: string;
Expand All @@ -126,8 +129,8 @@ export class SebmGoogleMapMarker implements OnDestroy, OnChanges, AfterContentIn

/* @internal */
ngAfterContentInit() {
if (this._infoWindow != null) {
this._infoWindow.hostMarker = this;
if (this.infoWindow != null) {
this.infoWindow.hostMarker = this;
}
}

Expand Down Expand Up @@ -170,8 +173,8 @@ export class SebmGoogleMapMarker implements OnDestroy, OnChanges, AfterContentIn

private _addEventListeners() {
const cs = this._markerManager.createEventObservable('click', this).subscribe(() => {
if (this.openInfoWindow && this._infoWindow != null) {
this._infoWindow.open();
if (this.openInfoWindow && this.infoWindow != null) {
this.infoWindow.open();
}
this.markerClick.emit(null);
});
Expand Down

0 comments on commit 648856d

Please sign in to comment.