I thought I had posted this on here already, but I can't seem to find it....
I'm using the tab theme and I have the layer list opening by default in the side panel. Is there a way to have it open with all the layers already expanded showing the symbology without having to click on each individual layer?
Solved! Go to Solution.
Will this work in WAB 2.5? Where does it need to be inserted in the layerlistview.js?
Yes it does. Same place as before.
I cannot get it to work, and no error in console?
var handle = on(popupMenuNode,
'click',
lang.hitch(this, function() {
var popupMenu = new PopupMenu({
//items: layerInfo.popupMenuInfo.menuItems,
_layerInfo: layerInfo,
box: this.layerListWidget.domNode.parentNode,
popupMenuNode: popupMenuNode,
layerListWidget: this.layerListWidget,
_config: this.config
}).placeAt(popupMenuNode);
this.own(on(popupMenu,
'onMenuClick',
lang.hitch(this, this._onPopupMenuItemClick, layerInfo, popupMenu)));
handle.remove();
}
setTimeout(lang.hitch(this,
this._onRowTrClick,
layerInfo,
imageShowLegendNode,
layerTrNode,
tableNode), 300);
}
George,
Sorry that is not the correct spot:
addLayerNode: function(layerInfo, level, toTableNode, position) {
.......
//bind event
handle = this.own(on(layerTitleTdNode,
'click',
lang.hitch(this,
this._onRowTrClick,
layerInfo,
imageShowLegendDiv,
layerTrNode,
tableNode)));
setTimeout(lang.hitch(this,
this._onRowTrClick,
layerInfo,
imageShowLegendDiv,
layerTrNode,
tableNode,
{}), 300);
this._layerNodeHandles[rootLayerInfo.id].push(handle[0]);
.....
As alway Robert Thanks, one more question, how can this be changed to expand the TOC layers but not show the symbology (legend)
George,
Yes the answer to that is earlier in this thread:
I am missing something then, I put in the code, when I change it as mentioned in previous thread layers disapear from Layer List, if I add it as then it works but with layer expanded to show legend.
George,
Works perfect for me, so you must have introduced a syntax error again:
//bind event
handle = this.own(on(layerTitleTdNode,
'click',
lang.hitch(this,
this._onRowTrClick,
layerInfo,
imageShowLegendDiv,
layerTrNode,
tableNode)));
if(layerInfo.newSubLayers.length > 0){
setTimeout(lang.hitch(this,
this._onRowTrClick,
layerInfo,
imageShowLegendDiv,
layerTrNode,
tableNode,
{}), 300);
}
this._layerNodeHandles[rootLayerInfo.id].push(handle[0]);
Hi everyone,
is there also some way to automatically expand the second level of the tree (the symbols) but not the first one?
When starting my app and the layer list widget I would like to have all map services collapsed (as it is on default). When expanding a map service the symbology should automatically be displayed without having to expand the layer. For your explanation I've added a screenshot how it should look like in the end when "Mobilität" is expanded.
I'm using Web AppBuilder Developer Edition version 2.0.1.
Thanks for your suggestions in advance!
Sebastian,
I am not running 2.0 anymore so I can't help with a version that is 6 versions behind.