There is an Enhanced LayerList widget for the Flex Viewer. Is there a similar Enhanced LayerList widget for Web AppBuilder? My client would like Expand All Layers/Collapse All Layers functionality in a context menu for the LayerList widget, as they did in their old Flex Viewer app. Any solutions or work-arounds for this issue? Thank you.
No. I am not. Going to defer to my colleagues (the programmers).
Matt,
Until the next release comes out you can refer to this thread for a code change to accomplish this:
Layer List: Expand Layers by Default
In WAB Dev 2.0 you would add this code:
if(layerInfo.newSubLayers.length > 0){ setTimeout(lang.hitch(this, this._onRowTrClick, layerInfo, imageShowLegendNode, layerTrNode, tableNode), 300);
after this code block:
//bind event this.own(on(layerTitleTdNode, 'click', lang.hitch(this, this._onRowTrClick, layerInfo, imageShowLegendNode, layerTrNode, tableNode)));
So that it looks like this:
//bind event this.own(on(layerTitleTdNode, 'click', lang.hitch(this, this._onRowTrClick, layerInfo, imageShowLegendNode, layerTrNode, tableNode))); if(layerInfo.newSubLayers.length > 0){ setTimeout(lang.hitch(this, this._onRowTrClick, layerInfo, imageShowLegendNode, layerTrNode, tableNode), 300);
where do we add the code in which widget json file do we add this to specifically? Robert Scheitlin, GISP
refer to this thread: