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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jan 22 06:31:01 EST 2009


Author: christoph
Date: 2009-01-22 06:31:01 -0500 (Thu, 22 Jan 2009)
New Revision: 3475

Modified:
   trunk/mapbender/http/javascripts/mod_dragMapSize.php
Log:
code conventions

Modified: trunk/mapbender/http/javascripts/mod_dragMapSize.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_dragMapSize.php	2009-01-21 11:21:36 UTC (rev 3474)
+++ trunk/mapbender/http/javascripts/mod_dragMapSize.php	2009-01-22 11:31:01 UTC (rev 3475)
@@ -20,18 +20,26 @@
 require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 echo "var mod_dragMapSize_target = '".$e_target[0]."';";
 ?>
-var mod_dagMapSize_offset  = 15;
-var mod_dagMapSize_active  = false;
+var mod_dragMapSize_offset  = 15;
+var mod_dragMapSize_active  = false;
+
 eventInit.register(function () {
 	mod_dragMapSize_init();
 });
+
 eventAfterMapRequest.register(function () {
 	mod_dragMapSize_arrange()
 });
 
 function mod_dragMapSize_arrange(){
-	var left = parseInt(document.getElementById(mod_dragMapSize_target).style.left) + parseInt(document.getElementById(mod_dragMapSize_target).style.width) + mod_dagMapSize_offset - (parseInt(document.getElementById('dragMapSize').style.width)/2);
-	var top = parseInt(document.getElementById(mod_dragMapSize_target).style.top) + parseInt(document.getElementById(mod_dragMapSize_target).style.height) + mod_dagMapSize_offset - (parseInt(document.getElementById('dragMapSize').style.height)/2);
+	var left = parseInt(document.getElementById(mod_dragMapSize_target).style.left) + 
+				parseInt(document.getElementById(mod_dragMapSize_target).style.width) + 
+				mod_dragMapSize_offset - 
+				(parseInt(document.getElementById('dragMapSize').style.width)/2);
+	var top = parseInt(document.getElementById(mod_dragMapSize_target).style.top) + 
+				parseInt(document.getElementById(mod_dragMapSize_target).style.height) + 
+				mod_dragMapSize_offset - 
+				(parseInt(document.getElementById('dragMapSize').style.height)/2);
 	mb_arrangeElement('','dragMapSize' , left, top);
 }
 
@@ -42,7 +50,7 @@
 }
 
 function mod_dragMapSize_down(e){
-	if(mod_dagMapSize_active == false){
+	if(mod_dragMapSize_active == false){
 		document.onmouseup = mod_dragMapSize_up;
 		document.onmousemove = mod_dragMapSize_drag;
 		
@@ -51,7 +59,7 @@
 		mb_start_y = clickY;
 		mb_end_x = clickX;
 		mb_end_y = clickY;
-		mod_dagMapSize_active = true;
+		mod_dragMapSize_active = true;
 
 		//create a div that catches all mouse interactions
 		var dragElement = document.getElementById("dragMapSize");
@@ -78,7 +86,7 @@
 	var mouseCatcher = document.getElementById("dragMapSize_helper");
 	mouseCatcher.parentNode.removeChild(mouseCatcher);
 	
-	mod_dagMapSize_active = false;
+	mod_dragMapSize_active = false;
 	mb_getMousePos(e);
 	mb_end_x = clickX;
 	mb_end_y = clickY;
@@ -107,7 +115,7 @@
 }
 
 function mod_dragMapSize_drag(e){
-	if(mod_dagMapSize_active){
+	if(mod_dragMapSize_active){
 	  	if (!e)
     		e = window.event;	
 		mb_getMousePos(e);



More information about the Mapbender_commits mailing list