Select to view content in your preferred language

ArcGIS Experience Builder Widget icon size

3431
11
Jump to solution
11-25-2023 11:56 AM
MajeedP
Occasional Contributor

I have a custom widget that is added to a widget controller. I am able to add an icon to the widget using this section in the widget settings:

MajeedPooyandeh_0-1700941632091.png

the problem is that the size of the image inside the icon, follows jimu-icon height and width and can't be changed:
<img src="mypng url" width="16" height="16" class="jimu-icon" alt="">

I have tried everything including changing the css in widget.tsx, but the css only applies to the element only after the widget is clicked. when the widget is opened, the size changes and the img inside icon has a larger size. I also tried to programatically change the style and attribute of the element inside the componentDidMount method of the widget, however still no luck. I played with the jimu-icon settings a bit, I changed the size of the config.json in ..\ArcGISExperienceBuilder\server\public\apps\3\resources\config like this:

"icon": {
"svg": "${appResourceUrl}/images/icon_picker_in_setting/1700936360929.png",
"properties": {
"filename": "1700936360929.png",
"originalName": "pngegg.png",
"path": "${appResourceUrl}/images/icon_picker_in_setting/1700936360929.png",
"isUploaded": true,
"inlineSvg": false,
"size":22
}
but seems like the size attribute doesn't change.

I have done the same with the default icon.svg in the widget folder itself, but still no luck. Any help will be much appreciated. 

 

11 Replies
LakshanaRajendran
New Contributor

Hi @MajeedP,

Can you please elaborate on what is build mode and the procedure to select the theme in build mode?

0 Kudos
JeffreyThompson2
MVP Regular Contributor

The build mode is this screen where you can actually construct your Experience. To select a theme, click the palette icon and select the theme of your choice in the sidebar. If you have made a custom theme, it should be in this list.

JeffreyThompson2_0-1705497568711.png

 

GIS Developer
City of Arlington, Texas
0 Kudos