[Mapbender-commits] r5282 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jan 5 12:02:48 EST 2010


Author: christoph
Date: 2010-01-05 12:02:48 -0500 (Tue, 05 Jan 2010)
New Revision: 5282

Modified:
   trunk/mapbender/http/plugins/mb_navigation.js
Log:


Modified: trunk/mapbender/http/plugins/mb_navigation.js
===================================================================
--- trunk/mapbender/http/plugins/mb_navigation.js	2010-01-05 17:00:31 UTC (rev 5281)
+++ trunk/mapbender/http/plugins/mb_navigation.js	2010-01-05 17:02:48 UTC (rev 5282)
@@ -29,7 +29,8 @@
  * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
  */
 
-var iconDim = 30;
+var iconDim = 16;
+var iconOffset = 10;
 var $this = $(this);
 
 Mapbender.events.init.register(function () {
@@ -42,7 +43,10 @@
 			var top, left;
 			switch (direction) {
 				case "n":
-					top = $target.css("top");
+					top = (
+						parseInt($target.css("top"), 10) + 
+						iconOffset
+					) + "px";
 					left = (
 						parseInt($target.css("left"), 10) + 
 						parseInt($target.css("width"), 10) / 2 - iconDim/2
@@ -51,7 +55,7 @@
 				case "s":
 					top = (
 						parseInt($target.css("top"), 10) + 
-						parseInt($target.css("height"), 10) - iconDim
+						parseInt($target.css("height"), 10) - iconDim - iconOffset
 					) + "px";
 					left = (
 						parseInt($target.css("left"), 10) + 
@@ -63,7 +67,10 @@
 						parseInt($target.css("top"), 10) + 
 						parseInt($target.css("height"), 10) / 2 - iconDim/2
 					) + "px";
-					left = $target.css("left");
+					left = (
+						parseInt($target.css("left"), 10) + 
+						iconOffset
+					) + "px";
 					break;
 				case "e":
 					top = (
@@ -72,7 +79,7 @@
 					) + "px";
 					left = (
 						parseInt($target.css("left"), 10) + 
-						parseInt($target.css("width"), 10) - iconDim
+						parseInt($target.css("width"), 10) - iconDim - iconOffset
 					) + "px";
 					break;
 			}



More information about the Mapbender_commits mailing list