Select to view content in your preferred language

Jewelry Box Theme and Smart Editor in Panel

1208
4
07-03-2017 02:58 PM
RodLockie1
Occasional Contributor

Hi,

I am using the Smart Editor Widget in the Jewelry Box Theme that loads in the left open panel. What i would like to know is if i can turn off the Smart Editor Widget on load of the page so people can click on areas and get a popup rather than opening the edit pane for that area.

I have tried just starting the panel so it is closed however it still opens the widget when hidden.

I am currently using Web AppBuilder Dev 2.4 to configure this. if any one has any ideas let me know.

Thanks,

Rod

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Rod,

  Any widget you put in the Jewelry box drawer will automatically be running/launched.

0 Kudos
RodLockie1
Occasional Contributor

Hi Robert,

I did think that. Do you know if there is anything in the code i could change or edit to turn this off at launch. I have tried automatically opening other widgets. But i believe the drawer opens last so it becomes activated.

My current work around which works alright if you are not to quick to click ok is to open a splash screen on load of page. Though this still loads before the drawer loads so if you click ok before the drawer widget loads completely it becomes active.

Thanks,

Rod

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rod,

   Here is some code that will deactivate the smart editor widget when the drawer is close and re-activate it when the drawer is opened (add lines 14 - 21):

      startup: function () {
.......... 
       LayerInfos.getInstance(this.map, this.map.itemInfo)
       .then(lang.hitch(this, function (operLayerInfos) {

         var timeoutValue;
         if (this.appConfig.theme.name === "BoxTheme") {
           timeoutValue = 1050;

         } else {
           timeoutValue = 1;
         }
         setTimeout(lang.hitch(this, function () {
           this.panel = this.getPanel();
           topic.subscribe('changeMapPosition', lang.hitch(this, function(){
             if(this.panel.windowState === 'minimized'){
               this.onDeActive();
             }else{
               this.onActive();
             }
           }));
...............
0 Kudos
RodLockie1
Occasional Contributor

Thanks.

I will have a try

0 Kudos