Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit 8abefa0

Browse files
s-gbzsebholstein
authored andcommitted
feat(AgmMarker): add rightclick support (#1443)
closes #1362
1 parent 34b7918 commit 8abefa0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

packages/core/directives/marker.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit {
115115
*/
116116
@Output() markerClick: EventEmitter<void> = new EventEmitter<void>();
117117

118+
/**
119+
* This event is fired when the user rightclicks on the marker.
120+
*/
121+
@Output() markerRightClick: EventEmitter<void> = new EventEmitter<void>();
122+
118123
/**
119124
* This event is fired when the user stops dragging the marker.
120125
*/
@@ -214,6 +219,11 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit {
214219
});
215220
this._observableSubscriptions.push(cs);
216221

222+
const rc = this._markerManager.createEventObservable('rightclick', this).subscribe(() => {
223+
this.markerRightClick.emit(null);
224+
});
225+
this._observableSubscriptions.push(rc);
226+
217227
const ds =
218228
this._markerManager.createEventObservable<mapTypes.MouseEvent>('dragend', this)
219229
.subscribe((e: mapTypes.MouseEvent) => {

0 commit comments

Comments
 (0)