Hello,
I would like to disable the openAtStart config for a in panel widget on mobile device. I know in config.json there is a mobileLayout section but it seems to not work for widget that are in a widgetPool.
This the part of my config.json where the widget is defined:
"widgetPool": { "panel": { "uri": "themes/LaunchpadTheme/panels/LaunchpadPanel/Panel", "position": { "relativeTo": "map" } }, "widgets": [ { "name": "LayerList", "version": "2.13", "uri": "widgets/LayerList/Widget", "config": "configs/LayerList/config_widgets_LayerList_Widget_41.json", "index": 1, "id": "widgets_LayerList_Widget_41", "label": "Liste de toutes les couches", "openAtStart": true } ] }
I know I could modify the widget.js to close it automatically if jimuUtils.inMobilieSize(), but that's not what I am trying to achieve. I would like to prevent the openAtStart completely.
Thank you!
Solved! Go to Solution.
Maxime,
I only did limited testing but if you make this change to the BaseLayoutManager.js. It worked for me.
if(!this.openAtStartWidget && widgetConfig.openAtStart){
if(!jimuUtils.inMobileSize()){
iconDijit.switchToOpen();
this.openAtStartWidget = widgetConfig.name;
}
}
Maxime,
I only did limited testing but if you make this change to the BaseLayoutManager.js. It worked for me.
if(!this.openAtStartWidget && widgetConfig.openAtStart){
if(!jimuUtils.inMobileSize()){
iconDijit.switchToOpen();
this.openAtStartWidget = widgetConfig.name;
}
}