[Mapbender-commits] r8609 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Apr 29 05:03:07 PDT 2013
Author: astrid_emde
Date: 2013-04-29 05:03:06 -0700 (Mon, 29 Apr 2013)
New Revision: 8609
Modified:
trunk/mapbender/http/javascripts/mod_overviewToggle.js
Log:
initialOpen - some bugs fixed, right position
Modified: trunk/mapbender/http/javascripts/mod_overviewToggle.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_overviewToggle.js 2013-04-29 11:58:17 UTC (rev 8608)
+++ trunk/mapbender/http/javascripts/mod_overviewToggle.js 2013-04-29 12:03:06 UTC (rev 8609)
@@ -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"
@@ -290,4 +304,4 @@
});
}
});
-};
\ No newline at end of file
+};
More information about the Mapbender_commits
mailing list