Dragging condition draw - Openlayers

Viewed 333

I'm currently developing a webapp that allows the end-user to draw different shapes. I've set the draw-object up with a condition to check for various things. This includes checking for intersections with other geometry objects.

The issue i have is that the condition is always called, and only returns the "pointerdown"-event. Basically if the user clicks and hold down the mouse (dragging), this leads to the segment not being added drawing due to the "clickTolerance":

https://openlayers.org/en/latest/apidoc/module-ol_interaction_Draw-Draw.html

This is fine, and i don't want to change this. The user should be able to drag the map while drawing. But the problem is that the condition is always called, even though the segment is not added to the drawing.

Is there any way around this?

1 Answers
Related