Bug
| Bug ID Number | BUG-000127418 |
|---|---|
| Submitted | December 16, 2019 |
| Last Modified | July 20, 2025 |
| Applies to | ArcGIS API for JavaScript |
| Version found | 4.13 |
| Operating System | Windows OS |
| Operating System Version | 10.0 64 Bit |
| Version Fixed | 4.15 |
| Status | Fixed |
Add the additional code to reflect the changes within the Legend.
Uncomment line 39-58 in the codepen sample to see the changes:
if(true){
LegendViewModel.prototype._addActiveLayerInfo = function(e, t) {
if (this._isLayerActive(t) && -1 === this.activeLayerInfos.indexOf(e)) {
var r = e.parent;
if(r){
if(-1 === r.children.indexOf(e)){
r.children.push(e)
};
this._sortActiveLayerInfos(r.children)
}else{
this.activeLayerInfos.add(e);
this._sortActiveLayerInfos(this.activeLayerInfos);
}
}
}
}
Bug ID: BUG-000127418
Software:
Get help from ArcGIS experts
Download the Esri Support App