exit the panTo method if the new center is the same as the current one, r=crschmidt (closes #1507)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7174 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1375,6 +1375,13 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
this.panTween = new OpenLayers.Tween(this.panMethod);
|
||||
}
|
||||
var center = this.getCenter();
|
||||
|
||||
// center will not change, don't do nothing
|
||||
if (lonlat.lon == center.lon &&
|
||||
lonlat.lat == center.lat) {
|
||||
return;
|
||||
}
|
||||
|
||||
var from = {
|
||||
lon: center.lon,
|
||||
lat: center.lat
|
||||
|
||||
Reference in New Issue
Block a user