Applied patch from Corey Puffault, checking for left click only in mouse toolbar, fixing #101.

git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@769 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-06-26 15:32:15 +00:00
parent 793bca701d
commit f90e4044e0

View File

@@ -96,6 +96,7 @@ OpenLayers.Control.MouseToolbar.prototype =
* @param {Event} evt
*/
defaultMouseDown: function (evt) {
if (!Event.isLeftClick(evt)) return;
this.mouseDragStart = evt.xy.copyOf();
if (evt.shiftKey && this.mode !="zoombox") {
this.switchModeTo("zoombox");
@@ -226,6 +227,7 @@ OpenLayers.Control.MouseToolbar.prototype =
* @param {Event} evt
*/
defaultMouseUp: function (evt) {
if (!Event.isLeftClick(evt)) return;
switch (this.mode) {
case "zoombox":
var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart );