-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right Click / context menu event in agm-marker #1362
Comments
We could implement the rightclick event |
Hey there, Can you give me a hint where in the code this should be implemented @SebastianM ? |
Thanks for responding. Under the marker directive. Inside marker.d.ts file. So that we could have the right mouse click event exposed to the user. |
Sorry it took so long, it's been a busy week. Hope this is what you've been looking for @lalitha02 :) HTML:
Typescript:
|
Yeah. Thanks. :)
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Sergej Grilborzer <[email protected]>
Sent: Friday, June 29, 2018 6:24:26 PM
To: SebastianM/angular-google-maps
Cc: Lalitha S; Mention
Subject: Re: [SebastianM/angular-google-maps] Right Click / context menu event in agm-marker (#1362)
Sorry it took so long, it's been a busy week.
Hope this is what you've been looking for @lalitha02<https://github.com/lalitha02> :)
HTML:
<agm-marker (markerRightClick)="onRightClick()">
Typescript:
onRightClick() {
console.log("Rightclicked!");
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1362 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AZtMJIK9tYgjc-pt8ItIH8b5zxDpMXE4ks5uBiOCgaJpZM4SzbiS>.
|
Is it updated in agm 1.0.0 beta-2 Or when we can get this feature in the agm? If not so soon, do we have any workaround to implement it? |
@s-gbz not working HTML: <agm-marker (markerRightClick)="onRightClick()"> onRightClick() { |
"@agm/core": "^1.0.0-beta.0" |
Hello guys, A possible workaround is to clone AGM master from Github and link your application to it. (Google: npm use local or take a look here. { |
Is there a reason AgmMarker is not cast in EventEmmiter when markerRightClick is raised? You can get AgmMarker object when markerClick is raised.
|
@Hect0rr the real question is why does markerClick send AgmMarker in the event. Event data is meant to give information about the event, not the target. AgmMarker objects should not be used directly by users of AGM library anyway. |
@doom777 Yeah I agree. But should you get MouseEvent at least? |
Yes, you should. Create a PR. |
Unable to access right click event in AgmMarker
Agm Map doesn't allow the user to create custom right click events as well.
marker.rightMouseClick = new EventEmitter();;
var rightclick = marker._markerManager.createEventObservable('rightclick', marker)
.subscribe(function (e) {
marker.rightMouseClick.emit(e);
});
marker._observableSubscriptions.push(rightclick);
The text was updated successfully, but these errors were encountered: