I've seen some talk about this in other discussions, but no solid solutions. Where would one need to add code to insert text lines between layers in the LayerList widget? I'm wanting to add some descriptive text, smaller font, bolded, and in red, below a few layers listed in the Widget. Can this be done??
Solved! Go to Solution.
Benjamin,
OK. I see the issue now. I have been looking into it for a bit now and I don't see an easy fix. I will try and keep you up to date if I find a fix.
Benjamin,
Here is what I came up with:
showLayers: function() {
// summary:
// create a LayerListView module used to draw layers list in browser.
this.layerListView = new LayerListView({
operLayerInfos: this.operLayerInfos,
layerListWidget: this,
layerFilter: this.layerFilter,
config: this.config
}).placeAt(this.layerListBody);
//RJS code changes begin
//The next line is what you need to change from your layer you want this desc added to
//.llayer-title-div-LOJIC_LandRecords_Louisville_4356
//replace LOJIC_LandRecords_Louisville_4356 with your layers id in the code
setTimeout(lang.hitch(this, function(){
var node = query('.layer-title-div-LOJIC_LandRecords_Louisville_4356')[0];
domConstruct.create('br', {}, node);
domConstruct.create('div', {
'innerHTML': "My special text",
'class':'div-content jimu-float-leading LayerNote'
}, node);
}), 1000);
//RJS code changes end
if(this.config.expandAllLayersByDefault) {
this.layerListView.foldOrUnfoldAllLayers(false);
}
},
.jimu-widget-layerList .LayerNote{
height: 10px;
color: #ff0000;
font-size: 11px;
margin-top: 6px;
}
Robert you are a Gentleman and a Scholar. Works perfectly again. Thank you.