I need in Web AppBuilder to change custom widget icons back to default widget icons. But I can’t figure out how to do it. When I go to change them, is opens up a dialogue to import a picture from my PC. How can I revert to the default widget icon?
Tom,
You can browse for the widgets original icon in the widgets folder of that app or the easier way is to open the main config.json in the apps root folder and find the widget(s) in question and delete the icon line.
Before:
{
"position": {
"left": 105,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 1,
"id": "_7",
"name": "Edit",
"version": "2.9",
"closeable": true,
"uri": "widgets/Edit/Widget",
"config": "configs/Edit/config__7.json",
"icon": "configs\\Edit\\icon__7.png"
},
After:
{
"position": {
"left": 105,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 1,
"id": "_7",
"name": "Edit",
"version": "2.9",
"closeable": true,
"uri": "widgets/Edit/Widget",
"config": "configs/Edit/config__7.json"
},
Hi Robert,
Thank you so much for such a thorough answer. Unfortunately, I can't really use code (which is why I don't use the "Developer Version" of Web AppBuilder).
At the beginning of your answer, you recommended that I could "...browse for the widgets original icon in the widgets folder." That's actually what I'm trying to do, but I can't seem to find the "widgets folder," because once I customize it, then there seems to be no path back to the original set, and when sharing with groups (like we do), you can't share customized widget icons. My co-worker recommends that I just record all the specifics of each tool that I have, then delete the tool and recreate it just so that I can access a default widget icon when it's created.
Tom,
So this is an App made by AGOL WAB? If so then you could use AGOL Assistant to edit the apps main json.
I just tested this by changing the icon for a widget on a AGOL WAB app and then going into AGOL Assistant and deleting the icon line like I mentioned before and it works great.