[fusion-commits] r2861 - sandbox/adsk/2.5k/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Jul 3 20:04:34 PDT 2014
Author: liuar
Date: 2014-07-03 20:04:34 -0700 (Thu, 03 Jul 2014)
New Revision: 2861
Modified:
sandbox/adsk/2.5k/widgets/Legend.js
Log:
#616: Refine submission 2849.
Don't add/remove tree item when show/hide group legend. Use style.display instead.
Modified: sandbox/adsk/2.5k/widgets/Legend.js
===================================================================
--- sandbox/adsk/2.5k/widgets/Legend.js 2014-06-29 08:18:50 UTC (rev 2860)
+++ sandbox/adsk/2.5k/widgets/Legend.js 2014-07-04 03:04:34 UTC (rev 2861)
@@ -530,14 +530,15 @@
},
hideEmptyGroup: function(group) {
- for (var i=0; i<group.groups.length; i++) {
- this.hideEmptyGroup(group.groups[i])
- }
if (group.hasVisibleLayers) {
- if (group.parentGroup.legend && group.parentGroup.legend.treeItem)
- group.parentGroup.legend.treeItem.add(group.legend.treeItem);
+ if (group.legend.treeItem) {
+ group.legend.treeItem.domObj.style.display = 'block';
+ }
+ for (var i=0; i<group.groups.length; i++) {
+ this.hideEmptyGroup(group.groups[i])
+ }
} else {
- group.parentGroup.legend.treeItem.remove(group.legend.treeItem);
+ group.legend.treeItem.domObj.style.display = 'none';
}
},
More information about the fusion-commits
mailing list