Skip to content

Commit

Permalink
Info window is leaking sebholstein#796
Browse files Browse the repository at this point in the history
extended mouse event with more information to allow to workaround the issue.
  • Loading branch information
remmeier committed Nov 30, 2017
1 parent b35d9bf commit aed5d6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/directives/marker.ts
Expand Up @@ -58,6 +58,11 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit {
*/
@Input() label: string;

/**
* Data associated with this marker
*/
@Input() data: any;

/**
* If true, the marker can be dragged. Default value is false.
*/
Expand Down Expand Up @@ -203,7 +208,7 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit {
const mover =
this._markerManager.createEventObservable<mapTypes.MouseEvent>('mouseover', this)
.subscribe((e: mapTypes.MouseEvent) => {
this.mouseOver.emit(<MouseEvent>{coords: {lat: e.latLng.lat(), lng: e.latLng.lng()}});
this.mouseOver.emit(<MouseEvent>{data: this.data, marker: this, coords: {lat: e.latLng.lat(), lng: e.latLng.lng()}});
});
this._observableSubscriptions.push(mover);

Expand Down

0 comments on commit aed5d6b

Please sign in to comment.