[fusion-commits] r2834 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Sat May 10 06:51:02 PDT 2014
Author: jng
Date: 2014-05-10 06:51:02 -0700 (Sat, 10 May 2014)
New Revision: 2834
Modified:
trunk/widgets/Legend.js
Log:
Fix http://trac.osgeo.org/mapguide/ticket/2445, this is caused by layers that are not visible at the current scale but are set to be shown anyway by the layer widget.
Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js 2014-05-01 12:18:46 UTC (rev 2833)
+++ trunk/widgets/Legend.js 2014-05-10 13:51:02 UTC (rev 2834)
@@ -800,10 +800,10 @@
createTreeItem: function(layer, style, scale, checkbox) {
var opt = {};
opt.statusIsDefault = layer.statusDefault;
-
+ var range = layer.legend.currentRange;
//Set the label. Use style label IFF there are more than one style rule.
//Otherwise layer's legend label takes precedence
- if (style && layer.legend.currentRange.styles.length > 1) {
+ if (style && range && range.styles.length > 1) {
opt.label = style.legendLabel == '' ? ' ' : style.legendLabel;
} else {
opt.label = layer.legendLabel == '' ? ' ' : layer.legendLabel;
More information about the fusion-commits
mailing list