[Mapbender-commits] r3860 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 7 11:52:10 EDT 2009


Author: christoph
Date: 2009-04-07 11:52:10 -0400 (Tue, 07 Apr 2009)
New Revision: 3860

Modified:
   trunk/mapbender/http/javascripts/mod_pan.php
Log:


Modified: trunk/mapbender/http/javascripts/mod_pan.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_pan.php	2009-04-07 15:51:40 UTC (rev 3859)
+++ trunk/mapbender/http/javascripts/mod_pan.php	2009-04-07 15:52:10 UTC (rev 3860)
@@ -85,22 +85,24 @@
 	}
 }
 function mod_pan_stop(e){
-	mb_panActive = false;
-	var dif_x = mb_end_x - mb_start_x;
-	var dif_y = mb_end_y - mb_start_y;
-	var width = mod_pan_MapObj.width;
-	var height = mod_pan_MapObj.height;      
-
-	var el = mod_pan_MapObj.getDomElement();
-	var center_x = (width / 2)  - dif_x;
-	var center_y = (height / 2) - dif_y;
-	var real_center = makeClickPos2RealWorldPos(mod_pan_target,center_x, center_y);   
-
-	mb_arrangeElement(mod_pan_MapObj.frameName, mod_pan_target+"_maps", 0, 0);
-	for(var i=0; i<mb_PanSubElements.length; i++){
-		mb_arrangeElement(mod_pan_MapObj.frameName, mb_PanSubElements[i], 0, 0);
-	} 
-   zoom(mod_pan_target,false, 1.0, real_center[0], real_center[1]);   
+	if(mb_panActive){
+		mb_panActive = false;
+		var dif_x = mb_end_x - mb_start_x;
+		var dif_y = mb_end_y - mb_start_y;
+		var width = mod_pan_MapObj.width;
+		var height = mod_pan_MapObj.height;      
+	
+		var el = mod_pan_MapObj.getDomElement();
+		var center_x = (width / 2)  - dif_x;
+		var center_y = (height / 2) - dif_y;
+		var real_center = makeClickPos2RealWorldPos(mod_pan_target,center_x, center_y);   
+	
+		mb_arrangeElement(mod_pan_MapObj.frameName, mod_pan_target+"_maps", 0, 0);
+		for(var i=0; i<mb_PanSubElements.length; i++){
+			mb_arrangeElement(mod_pan_MapObj.frameName, mb_PanSubElements[i], 0, 0);
+		} 
+	   zoom(mod_pan_target,false, 1.0, real_center[0], real_center[1]);   
+	}
 }
 function mod_pan_move_map(){
 	var dif_x = mb_end_x - mb_start_x;



More information about the Mapbender_commits mailing list