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:
@@ -1325,9 +1325,16 @@ OpenLayers.Map = OpenLayers.Class({
|
|||||||
}, this),
|
}, this),
|
||||||
eachStep: OpenLayers.Function.bind(function(lonlat) {
|
eachStep: OpenLayers.Function.bind(function(lonlat) {
|
||||||
var lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);
|
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),
|
}, this),
|
||||||
done: OpenLayers.Function.bind(function(lonlat) {
|
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.events.triggerEvent("moveend");
|
||||||
}, this)
|
}, this)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user