[fusion-commits] r2517 - in sandbox/adsk/2.4jbeta2: templates/mapguide/standard/images/icons widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Fri Jan 13 00:44:58 EST 2012


Author: liuar
Date: 2012-01-12 21:44:58 -0800 (Thu, 12 Jan 2012)
New Revision: 2517

Added:
   sandbox/adsk/2.4jbeta2/templates/mapguide/standard/images/icons/out-of-range.png
Modified:
   sandbox/adsk/2.4jbeta2/widgets/Legend.js
Log:
Port the fix of Ticket #510 to adsk2.4j beta2 branch

Added: sandbox/adsk/2.4jbeta2/templates/mapguide/standard/images/icons/out-of-range.png
===================================================================
(Binary files differ)


Property changes on: sandbox/adsk/2.4jbeta2/templates/mapguide/standard/images/icons/out-of-range.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: sandbox/adsk/2.4jbeta2/widgets/Legend.js
===================================================================
--- sandbox/adsk/2.4jbeta2/widgets/Legend.js	2012-01-13 05:44:00 UTC (rev 2516)
+++ sandbox/adsk/2.4jbeta2/widgets/Legend.js	2012-01-13 05:44:58 UTC (rev 2517)
@@ -74,6 +74,12 @@
      */
     defaultGroupInfoIcon: 'images/icons/group-info.png',
     
+    /**
+     * Constant: outOfRangeIcon
+     * {String}: The default image for layers outside the current visible scale range
+     */
+    outOfRangeIcon: 'images/icons/out-of-range.png',
+    
     initializeWidget: function(widgetTag) {
         // TODO: maybe it's a good idea to do a function like Fusion.Widget.BindRenderer.. for limit the code
         // duplication if we plan to apply this pattern to others widgets
@@ -636,9 +642,9 @@
                     layer.legend.treeItem = null;
                 }
             } else {
-              var newTreeItem = this.createTreeItem(layer, {legendLabel: layer.legendLabel}, null, !layer.isBaseMapLayer);
+              var newTreeItem = this.createTreeItem(layer, {legendLabel: layer.legendLabel, iconOpt: { url: this.oLegend.outOfRangeIcon } }, null, !layer.isBaseMapLayer);
                 if (layer.legend.treeItem) {
-                    layer.parentGroup.legend.treeItem.replace(newTreeItem, layer.legend.treeItem);
+                    layer.parentGroup.legend.treeItem.replace(layer.legend.treeItem, newTreeItem);
                     layer.legend.treeItem.finalize();
                 } else {
                     layer.parentGroup.legend.treeItem.add(newTreeItem);



More information about the fusion-commits mailing list