It looked like movestart, move and moveend events weren't triggered in a good way while using panTo (with panTween effect), this is fixed by calling moveTo with 'dragging' and 'noEvent' options, and trigering 'moveend' internaly, r=crschmidt (Closes #1348)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6203 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
pgiraud
2008-02-11 13:55:04 +00:00
parent 32d541641d
commit 93b25bf073

View File

@@ -1325,9 +1325,16 @@ OpenLayers.Map = OpenLayers.Class({
}, this),
eachStep: OpenLayers.Function.bind(function(lonlat) {
var lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);
this.moveTo(lonlat, this.zoom, true);
this.moveTo(lonlat, this.zoom, {
'dragging': true,
'noEvent': true
});
}, this),
done: OpenLayers.Function.bind(function(lonlat) {
var lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);
this.moveTo(lonlat, this.zoom, {
'noEvent': true
});
this.events.triggerEvent("moveend");
}, this)
}