Jewelry Box theme. WAB 2.2
Hello,
My custom widgets are launched through a feature action. However, I still seem to have to have the widget icons visible on the map window. Is it possible to hide the widget icons? I tried changing the location of them in the config.json by pushing them off the left side. But that also made the widget launch off the viewable area. I'd like to hide the widget icons and still have the widget launch inside the map windows viewable area.
Thank You,
Greg
Solved! Go to Solution.
Greg,
No you do not have to anything else beside changing the
if(this.widgetConfig.label === 'Enhanced Search'){
"Enhanced Search" to the actual label of the widget you are wanting to hide.
All of this is assuming you are talking about hiding on screen widgets.
Greg,
In your apps jimu.js/OnScreenWidgetIcon.js file find the postCreate method and add code like this (lines 6-8):
postCreate: function(){
this.inherited(arguments);
this.iconNode = html.create('img', {
src: this.widgetConfig.icon
}, this.domNode);
if(this.widgetConfig.label === 'Enhanced Search'){
html.setStyle(this.domNode, 'display', 'none');
}
Robert,
Nope, that didn't do anything. Am I suppose to do anything else? Move the widgets off screen? And yes I'm sure I got the correct file. I'm in Icon not Panel, OnScreenWidgetIcon.js.
Greg
Greg,
No you do not have to anything else beside changing the
if(this.widgetConfig.label === 'Enhanced Search'){
"Enhanced Search" to the actual label of the widget you are wanting to hide.
All of this is assuming you are talking about hiding on screen widgets.
Robert,
Yes, that worked. I misunderstood the need to replace Enhanced Search with my widget name, I apologize. Had I put a break point and looked closer I think I would have understood that.
Thank you,
Greg