How to use right-click to finish drawing a Polygon in OpenLayers?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use right-click to finish drawing a Polygon in OpenLayers?

Dev3
I'm using OpenLayers 2.13 and the DrawFeature control. By Default, the Polygon is completed, when you double click.
Some of our clients are requesting that we allow the mouse right-click, to finish the polygon.
I tried adding a rightclick function to the OpenLayers.Handler.Polygon class, but it is never called.
I also confirmed that the right click event is being registered in the activate method of the OpenLayers.Handler class.

How do I override this default behavior to allow the mouse right-click to finish the polygon?

Regards,
Devdatta

_______________________________________________
Dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to use right-click to finish drawing a Polygon in OpenLayers?

rtaylor
This post has NOT been accepted by the mailing list yet.
I'm not sure the situation, but are you handling the right click event? And then calling your functions from there?