If the pan tween is playing when the map is destroyed, stop the tween. r=pspencer (closes #2156)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9526 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-06-26 01:01:00 +00:00
parent 9d74c087ce
commit 1e35173c2b
2 changed files with 23 additions and 0 deletions

View File

@@ -632,6 +632,11 @@ OpenLayers.Map = OpenLayers.Class({
if (!this.unloadDestroy) {
return false;
}
// make sure panning doesn't continue after destruction
if(this.panTween && this.panTween.playing) {
this.panTween.stop();
}
// map has been destroyed. dont do it again!
OpenLayers.Event.stopObserving(window, 'unload', this.unloadDestroy);