[Mapbender-commits] r8608 - branches/2.7/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Apr 29 04:58:18 PDT 2013


Author: astrid_emde
Date: 2013-04-29 04:58:17 -0700 (Mon, 29 Apr 2013)
New Revision: 8608

Modified:
   branches/2.7/http/javascripts/mod_overviewToggle.js
Log:
initialOpen - some bugs fixed, right position

Modified: branches/2.7/http/javascripts/mod_overviewToggle.js
===================================================================
--- branches/2.7/http/javascripts/mod_overviewToggle.js	2013-04-23 05:46:51 UTC (rev 8607)
+++ branches/2.7/http/javascripts/mod_overviewToggle.js	2013-04-29 11:58:17 UTC (rev 8608)
@@ -48,14 +48,16 @@
  * and Simplified BSD license.  
  * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
  */
-if (!options.initialOpen ) {
+
+if (!options.initialOpen || options.initialOpen == 'false') {
 	options.initialOpen  = false;
 }
 
+var overview_visible = options.initialOpen;
+
 var ovSwitchTarget = options.target[0];
 var ovSwitchId = options.id;
 
-var overview_visible = options.initialOpen;
 
 if (!options.overviewToggle_position_offset_top) {
 	var overviewToggle_position_offset_top = 0;
@@ -198,18 +200,29 @@
 	
 	
 	if (overviewToggle_position == 'lr'){
+		if (!overview_visible || overview_visible == false) {
+			var leftthis = mapframeLeft + mapframeWidth - 35;
+		}else{
+			var leftthis = mapframeLeft + mapframeWidth - overviewInitialWidth;
+		}		
 		$this.css({
 			display:"inline-block",
-			left: (mapframeLeft + mapframeWidth - overviewInitialWidth) + "px",
+			left: leftthis + "px",
 			top: (mapframeTop + mapframeHeight - 26 ) + "px",
 			zIndex: $ov.css("zIndex")
 		});
 	}else if (overviewToggle_position == 'ur'){
+		if (!overview_visible || overview_visible == false) {
+			var leftthis = mapframeLeft + mapframeWidth - 35;
+		}else{
+			var leftthis = mapframeLeft + mapframeWidth - overviewInitialWidth;
+		}
 		$this.css({
 			display:"inline-block",
-			left: (mapframeLeft + mapframeWidth - overviewInitialWidth) + "px",
-			top: (mapframeTop + overviewToggle_position_offset_top - 26) + "px",
+			left: leftthis + "px",
+			top: (mapframeTop + overviewToggle_position_offset_top - 26)  + "px",
 			zIndex: $ov.css("zIndex")
+	
 		});
 	}else{
 		$this.css({
@@ -275,6 +288,7 @@
 					display: "block",
 					width: overviewInitialWidth,
 					height: 0,
+					left:leftovt,
 					borderWidth: "1px",
 					borderStyle: "solid",
 					borderColor: "#176798"					



More information about the Mapbender_commits mailing list