From 93b25bf073ab0a75582608a149406486d68a3e7e Mon Sep 17 00:00:00 2001 From: pgiraud Date: Mon, 11 Feb 2008 13:55:04 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Map.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 61144e05dc..9fe0656799 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -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) }