In the following fiddle, how can I prevent the click event from bubbling up and calling “AddVertex” when I am dragging and dropping?
To replicate:
- Click on document (will add a vertex)
- Click on vertex and drag, upon releasing the mouse addVertex is called which creates another vertex.
I have tried all sorts of combinations of event.stopPropogation, return false etc. in the up function to no joy.
I was able to make it work by changing it to this: