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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user