In my map, I have added a <span style="font-family: courier new,monospace;">OpenLayers.Control.DrawFeature(vectorLayer, OpenLayers.Handler.Polygon) </span>control for drawing a polygon.<br><br>The polygon gets drawn for both left clicks and right clicks on the map.<br>
<br>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.<br>
<br>The Polygon handler inherits from the Path handler which contains a<br><br><span style="font-family: courier new,monospace;">mousedown: function(evt) { ... }</span><br><br>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.)<br>
<br>Meanwhile, the <span style="font-family: courier new,monospace;">OpenLayers.Control.Navigation</span> control (added by default to most maps) has a <span style="font-family: courier new,monospace;">handleRightClicks</span> property that is <b>false</b> by default. So I don't think my solution is there...<br>
<br>Any help or advice is appreciated!<br><br>--Harry L.<br><a href="mailto:mr.harry.lam@gmail.com">mr.harry.lam@gmail.com</a><br>