I know in Launch Pad theme, you can open more than one widgets and let them all display on the screen. Is that possible to adjust anything in Jewelry Box theme, so that two widgets can also open and coexist on the screen? Currently once you open one widget, it will close the other open widget on the screen. Thanks!
Solved! Go to Solution.
Lei,
If you are talking about the on screen widgets then you open the [install dir]\server\apps\[app#]\jimu.js\OnScreenWidgetIcon.js file and edit the switchToOpen function like this:
switchToOpen: function(){ this.state = 'opened'; // this.panelManager.closeAllPanelsInGroup(this.widgetConfig.gid); // array.forEach(this.widgetManager.getOnScreenOffPanelWidgets(), function(widget){ // if(widget.closeable){ // this.widgetManager.closeWidget(widget); // } // }, this); html.addClass(this.domNode, 'jimu-state-selected');
Lei,
If you are talking about the on screen widgets then you open the [install dir]\server\apps\[app#]\jimu.js\OnScreenWidgetIcon.js file and edit the switchToOpen function like this:
switchToOpen: function(){ this.state = 'opened'; // this.panelManager.closeAllPanelsInGroup(this.widgetConfig.gid); // array.forEach(this.widgetManager.getOnScreenOffPanelWidgets(), function(widget){ // if(widget.closeable){ // this.widgetManager.closeWidget(widget); // } // }, this); html.addClass(this.domNode, 'jimu-state-selected');
Robert,
In launchpad theme it is not working? I did the exact same thing.
Ifran,
in the launchpad theme there is no problem opening more than one widget so there is no need for this code.
Robert,
How can I do in launchpad theme? I did try from widget menu you can select only one at a time, please help me! I want to open more than one widget, let suppose 3 widget on the screen when my app open how can I?
Ifran,
OK opening two widgets at startup is a bit different then just being able to open two widget at runtime (which is what this thread is about). So opening two widget at startup is not supported currently.
Hi Robert,
Is it possible we can open more than two in panel widgets in Jewelry Box theme and also we can add mouse drag option some thing like in Launch Pad theme. Always, appreciate your help!
Irfan,
If you want more than one widget in the jewelry box drawer then you have to manually edit the apps main config.json and set the maxWidgets to 2 and then manually add another widget to the widgets array. As far as dragging, that would take a lot of work.
Robert,
I added the maxWidget 2, now i can see a + sign came after that from where I can add any widget form widgets array. Also,after adding 2nd widget it changes the widgets to Group 0. Somehow, when I open the jewelry box drawer it shows only 1 widget not the 2nd widget?
Is this right you are talking about the left click mouse press drag option when we press the mouse button we can drag and adjust the position of widget on screen?
Thank you for your help!
Irfan,
See this thread:
https://community.esri.com/thread/206659-group-widgets-in-folder-in-ldockable-panel