[fusion-commits] r2726 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu May 30 21:07:50 PDT 2013
Author: jng
Date: 2013-05-30 21:07:49 -0700 (Thu, 30 May 2013)
New Revision: 2726
Modified:
trunk/widgets/Legend.js
Log:
#573: Fix incorrect label for single-rule layers
Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js 2013-05-30 07:37:05 UTC (rev 2725)
+++ trunk/widgets/Legend.js 2013-05-31 04:07:49 UTC (rev 2726)
@@ -800,8 +800,9 @@
var opt = {};
opt.statusIsDefault = layer.statusDefault;
- //set the label
- if (style && style.legendLabel) {
+ //Set the label. Use style label IFF there are more than one style rule.
+ //Otherwise layer's legend label takes precedence
+ if (style && style.legendLabel && layer.legend.currentRange.styles.length > 1) {
opt.label = style.legendLabel == '' ? ' ' : style.legendLabel;
} else {
opt.label = layer.legendLabel == '' ? ' ' : layer.legendLabel;
More information about the fusion-commits
mailing list