Onscreen widgets - keep it open

1937
8
Jump to solution
02-16-2017 06:19 PM
GisGKAuckland
New Contributor III

Am new to WAB customization.

When I click the onscreen widget, only one remains open. I would one of them to remain open all the time. Any idea how it can be done?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

When using the launchpad theme if you add widgets to the AnchorBar controller instead of the on screen widget place holders then you can have as many open as you wish.

Short of using those two themes than you would have to modify the OnScreenWidgetIcon.js to comment out the code that closes all other open on screen widget:

    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);‍‍‍‍‍‍‍‍‍
    .....

View solution in original post

8 Replies
RobertScheitlin__GISP
MVP Emeritus

If you use the launchpad theme or box theme then you can have multiple widgets open at once.

GisGKAuckland
New Contributor III

Thanks for the reply

The Launchpad theme is the one currently used and from current indications people are not flexible to move to another theme.

I agree if the widget is put in the Box controller or the widget pool (as referred in the config), they remain open. This widget remain outside the Box Controller . These widgets behave like the minimize, maximize & home button in the left top.

One can put a basemap or About widget outside Box Controller and check the behavior. Only one is allowed open at one time. I can share a video if I am still not clear

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

When using the launchpad theme if you add widgets to the AnchorBar controller instead of the on screen widget place holders then you can have as many open as you wish.

Short of using those two themes than you would have to modify the OnScreenWidgetIcon.js to comment out the code that closes all other open on screen widget:

    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);‍‍‍‍‍‍‍‍‍
    .....
GisGKAuckland
New Contributor III

Guess this is what I was after

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Glad to help.

Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.

0 Kudos
GisGKAuckland
New Contributor III

Thanks Robert. That worked like a charm.

Also is this the correct forum to put questions like this for customization? The recent activity thread makes me feel nothing much is happening

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

This space is fine and the Web AppBuilder Custom Widgets space for custom widget development questions.

0 Kudos
MichaelDeliberato
New Contributor III

GisGK Auckland‌ is it possible to make the widget unable to be minimized or closed? we have a piece of text that we want onscreen no matter what. is that possible?

0 Kudos