[OpenLayers-Users] Disabling right-click during DrawFeature of a
polygon
Harry Lam
mr.harry.lam at gmail.com
Fri Nov 20 13:59:49 EST 2009
In my map, I have added a OpenLayers.Control.DrawFeature(vectorLayer,
OpenLayers.Handler.Polygon) control for drawing a polygon.
The polygon gets drawn for both left clicks and right clicks on the map.
How can I remove the right-click functionality? I ask because I already
have other code to pull up a custom context menu on right-click. What
occurs presently is that both the menu and the next polygon point appear at
the same time. So while not an error per se, it is distracting and
counter-intuitive.
The Polygon handler inherits from the Path handler which contains a
mousedown: function(evt) { ... }
function that I assume is the driver for drawing the polygon. Am I forced
to add custom code in here to disable my right-clicks? (I would prefer not
to mess with the internal JS files if there are alternative methods.)
Meanwhile, the OpenLayers.Control.Navigation control (added by default to
most maps) has a handleRightClicks property that is *false* by default. So
I don't think my solution is there...
Any help or advice is appreciated!
--Harry L.
mr.harry.lam at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091120/f8733137/attachment.html
More information about the Users
mailing list