Skip to content

Commit

Permalink
feat(AgmMarker): include marker instance in markerClick emitter
Browse files Browse the repository at this point in the history
It is usefull to be able to work directly with the marker clicked in the event handler, instead of writing extra code to determine it
  • Loading branch information
christostatitzikidis authored and sebholstein committed Sep 22, 2018
1 parent ca0b8f0 commit 89b6e5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/directives/marker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit {
/**
* This event emitter gets emitted when the user clicks on the marker.
*/
@Output() markerClick: EventEmitter<void> = new EventEmitter<void>();
@Output() markerClick: EventEmitter<AgmMarker> = new EventEmitter<AgmMarker>();

/**
* This event is fired when the user rightclicks on the marker.
Expand Down Expand Up @@ -215,7 +215,7 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit {
if (this.openInfoWindow) {
this.infoWindow.forEach(infoWindow => infoWindow.open());
}
this.markerClick.emit(null);
this.markerClick.emit(this);
});
this._observableSubscriptions.push(cs);

Expand Down

0 comments on commit 89b6e5c

Please sign in to comment.