[fusion-commits] r2312 - in trunk: layers layers/Generic layers/MapServer lib widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Jan 6 11:05:51 EST 2011


Author: madair
Date: 2011-01-06 08:05:51 -0800 (Thu, 06 Jan 2011)
New Revision: 2312

Modified:
   trunk/layers/Generic/Generic.js
   trunk/layers/Layers.js
   trunk/layers/MapServer/MapServer.js
   trunk/lib/Widget.js
   trunk/widgets/Legend.js
Log:
various minor canges for getScale() and Legend bugs

Modified: trunk/layers/Generic/Generic.js
===================================================================
--- trunk/layers/Generic/Generic.js	2010-12-28 02:02:45 UTC (rev 2311)
+++ trunk/layers/Generic/Generic.js	2011-01-06 16:05:51 UTC (rev 2312)
@@ -240,6 +240,17 @@
     },
     
     asyncTrigger: function() {
+        this.aLayers = new Array();
+        this.aLayers[0] = new Fusion.Layers.Layer({
+          layerName: this.getMapName(),
+          legendLabe: this.getMapName(),
+          displayInLegend: true,
+          expandInLegend: true,
+          actuallyVisible: true,
+          visible: true,
+          initiallyVisible: true,
+          selectable: false
+        }, this);
         this.bMapLoaded = true;
         this.triggerEvent(Fusion.Event.LAYER_LOADED);
     },

Modified: trunk/layers/Layers.js
===================================================================
--- trunk/layers/Layers.js	2010-12-28 02:02:45 UTC (rev 2311)
+++ trunk/layers/Layers.js	2011-01-06 16:05:51 UTC (rev 2312)
@@ -106,6 +106,9 @@
       if (userFunc) userFunc();
     },
 
+    getScale: function() {
+        return this.mapWidget.getScale();
+    },
 
     getMapName: function() {
         return this._sMapname;

Modified: trunk/layers/MapServer/MapServer.js
===================================================================
--- trunk/layers/MapServer/MapServer.js	2010-12-28 02:02:45 UTC (rev 2311)
+++ trunk/layers/MapServer/MapServer.js	2011-01-06 16:05:51 UTC (rev 2312)
@@ -517,10 +517,6 @@
         }
     },
 
-    getScale: function() {
-        return this.mapWidget.getScale();
-    },
-
     updateLayer: function() {   //to be fleshed out, add query file to layer if selection, call this before draw
       if (this.hasSelection()) {
           this.oLayerOL.addOptions({queryfile: this._sQueryfile});

Modified: trunk/lib/Widget.js
===================================================================
--- trunk/lib/Widget.js	2010-12-28 02:02:45 UTC (rev 2311)
+++ trunk/lib/Widget.js	2011-01-06 16:05:51 UTC (rev 2312)
@@ -93,7 +93,7 @@
               uiObj.button.setTooltip(this.widgetTag.tooltip);
           }
         }
-        if (this.isExclusive) {
+        if (this.isExclusive  && Fusion.Widget.uiInstances[this.type].length==1) {
         	if (Fusion.Widget.uiInstances[this.type].length==1) {
             this.getMap().buttonSet.add(uiObj);
           } else {

Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js	2010-12-28 02:02:45 UTC (rev 2311)
+++ trunk/widgets/Legend.js	2011-01-06 16:05:51 UTC (rev 2312)
@@ -737,8 +737,8 @@
                     img.inject(sibling, 'after');
                 }
                 img.setStyle('visibility','visible');
-                this.iconWidth = (style.iconOpt.width - w)/2;
-                this.iconHeight = (style.iconOpt.height - h)/2;
+                this.iconWidth = ((style.iconOpt?style.iconOpt.width:16) - w)/2;
+                this.iconHeight = ((style.iconOpt?style.iconOpt.height:16) - h)/2;
                 //alert(w+":"+h);
                 this.offsetsCalculated = true;
             }



More information about the fusion-commits mailing list