Skip to content
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

Add preventDefault to map and marker events #19

Open
mrunks opened this issue Dec 5, 2021 · 0 comments
Open

Add preventDefault to map and marker events #19

mrunks opened this issue Dec 5, 2021 · 0 comments

Comments

@mrunks
Copy link

mrunks commented Dec 5, 2021

Is your feature request related to a problem? Please describe.
I am looking for a way to add or use preventDefault on Map and Marker events such as click, double click, contextmenu.

Describe the solution you'd like

I have a contextmenut in an angular app that uses preventDefault as shown in the last line. I am not sure how this can be done
in for markers and Maps in Blazor

this.map.on('contextmenu', function (e: any) {
const originalEvent = e.originalEvent as MouseEvent;
originalEvent.preventDefault();
}

this.marker.addEventListener('dblclick', function (e: any) {
const evt = e.originalEvent as MouseEvent;
evt.preventDefault();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant