[Mapbender-commits] r1314 - trunk/mapbender/http/html
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed May 9 10:29:50 EDT 2007
Author: christoph
Date: 2007-05-09 10:29:50 -0400 (Wed, 09 May 2007)
New Revision: 1314
Modified:
trunk/mapbender/http/html/mod_treefolder2.php
Log:
opacity is not applied for hidden wms; checks also if div tag is available
lesson learned: getElementById returns null if no object is found (not undefined)
Modified: trunk/mapbender/http/html/mod_treefolder2.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolder2.php 2007-05-09 13:44:54 UTC (rev 1313)
+++ trunk/mapbender/http/html/mod_treefolder2.php 2007-05-09 14:29:50 UTC (rev 1314)
@@ -312,7 +312,7 @@
if (parent.mb_mapObj[mapObj_id].wms[wms_id].gui_wms_visible > 0) {
wmsImage = parent.mapframe1.document.getElementById('div_'+wms_id);
- if (typeof(wmsImage) != 'undefined') {
+ if (wmsImage != null) {
opacity = wmsImage.style.opacity*100 - (-increment);
opacity = (opacity < 100)? ((opacity > 0)? opacity : 0) : 100;
parent.mb_mapObj[mapObj_id].wms[wms_id].gui_wms_mapopacity = (opacity / 100);
@@ -325,7 +325,7 @@
if (parent.mb_mapObj[mapObj_id].wms[wms_id].gui_wms_visible > 0) {
var divId = 'div_'+wms_id;
wmsImage = parent.mapframe1.document.getElementById(divId);
- if (typeof(wmsImage) != 'undefined') {
+ if (wmsImage != null) {
wmsImage.style.opacity = (opacity / 100);
wmsImage.style.MozOpacity = (opacity / 100);
wmsImage.style.KhtmlOpacity = (opacity / 100);
More information about the Mapbender_commits
mailing list