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

DrawRegular condition option like in the ol.Interaction.Draw? #670

Closed
DmitrySavritsky opened this issue Oct 1, 2021 · 6 comments
Closed

Comments

@DmitrySavritsky
Copy link

Hello, is there any possibility to not handle some events in the DrawRegular interaction? There is a 'condition' option in the ol.interaction.Draw class, with the help of which I can indicate whether that event should be handled. For an example, I can skip the handle of the right click event on a map. Is there any possibility to do something similar for the DrawRegular interaction?

@Viglino
Copy link
Owner

Viglino commented Oct 1, 2021

There is no such option now.
I can see how to add it...

@DmitrySavritsky
Copy link
Author

DmitrySavritsky commented Oct 1, 2021

It will be very useful option, for me at least)

Viglino added a commit that referenced this issue Oct 1, 2021
@Viglino
Copy link
Owner

Viglino commented Oct 1, 2021

I've pushed a new option to let you customize a condition on click event...

@DmitrySavritsky
Copy link
Author

Thank you! And how can I get the updated version of DrawRegular? I need only to update package with "npm update ol-ext"? Or something else?

@Viglino
Copy link
Owner

Viglino commented Oct 1, 2021

It's not published yet...
To test it you can copy the Github ./src directory content in your node_module/ol-ext

@Viglino
Copy link
Owner

Viglino commented Oct 1, 2021

I've just published 3.2.7 on npm https://www.npmjs.com/package/ol-ext
You can now npm update ol-ext

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

No branches or pull requests

2 participants