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);
|
this.panTween = new OpenLayers.Tween(this.panMethod);
|
||||||
}
|
}
|
||||||
var center = this.getCenter();
|
var center = this.getCenter();
|
||||||
|
|
||||||
|
// center will not change, don't do nothing
|
||||||
|
if (lonlat.lon == center.lon &&
|
||||||
|
lonlat.lat == center.lat) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var from = {
|
var from = {
|
||||||
lon: center.lon,
|
lon: center.lon,
|
||||||
lat: center.lat
|
lat: center.lat
|
||||||
|
|||||||
Reference in New Issue
Block a user