AckerApple / agm-overlays

Custom marker overlay for the @agm/core package
MIT License
25 stars 24 forks source link

contextmenu event #11

Closed tolvaly closed 6 years ago

tolvaly commented 6 years ago

Could you add a contextmenu (rightClick) output for the agm-overlay?

Probably this can help you: agm-marker right click event

AckerApple commented 6 years ago

That’s a loaded question. I mean you yourself could easily add a right click action attached to your map html. This package outputs custom html onto a map and that’s its duties. You can now do whatever you fancy from modals to click menus. Knock yourself out. This package is going to keep its focus just on html objects on a google map.

AckerApple commented 6 years ago

I just saw now you edited your original comment and provided code references.

Yeah this seems possible with that small amount of code

You’ll need to make a pull request and do the code yourself. I have no immediate need for this and am loaded.

Again, you have access to the html and I recommend you just add your right click right there

tolvaly commented 6 years ago

Yes, that was how I've done it for the moment, but it would be nice to have that event in the agm-overlay element already. I will try to implement this functionality and make a pull request this week.

AckerApple commented 6 years ago

Meh, "nice to have" is a relative term I do not favor in terms of a package doing more than it needs to.

The only strong leg you have to stand on is that the agm marker package provided non-html markers that do NOT have access to basic html events SO thats why they have right click events and such. I dont think its a strong enough argument for this package to follow suit

Regardless, I'm not lifting a finger on this one and even a pull request would be yawned at.

Sorry to be so direct and short. Fare well

tolvaly commented 6 years ago

Ok, you are the person who must take such decisions.

Anyway thank you for this awesome library!