only call the concluding setCenter() (which generally will do no more than fire the 'moveend' event) if the drag was actually performed. otherwise, it was just a click, and no need.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1012 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-26 15:33:12 +00:00
parent a171ae13b6
commit 88e1b772b9

View File

@@ -130,7 +130,9 @@ OpenLayers.Control.MouseDefaults.prototype =
this.map.viewPortDiv.removeChild(document.getElementById("zoomBox"));
this.zoomBox = null;
} else {
this.map.setCenter(this.map.center);
if (this.performedDrag) {
this.map.setCenter(this.map.center);
}
}
document.onselectstart=null;
this.mouseDragStart = null;