From 88e1b772b95c01459edbc6a3f86208b54c55c146 Mon Sep 17 00:00:00 2001 From: euzuro Date: Wed, 26 Jul 2006 15:33:12 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Control/MouseDefaults.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Control/MouseDefaults.js b/lib/OpenLayers/Control/MouseDefaults.js index 60eca331ac..432bc207f2 100644 --- a/lib/OpenLayers/Control/MouseDefaults.js +++ b/lib/OpenLayers/Control/MouseDefaults.js @@ -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;