alterwiel

Adding on screen widgets to WAB

Blog Post created by alterwiel on Jun 18, 2015

This will add an on screen widget to WAB and display a button with the widget icon and an "eye" for visibility in the Widgets tab of a web app.

 

1. Add widget folder to \client\stemapp\widgets

 

2. Add widget to \client\stemapp\predefined-apps\default\config.json n the "widgetOnScreen.widgets" array

    {

      "uri": "widgets/AddrRoadSearchZoom/Widget",

      "position": {

        "left": 45,

        "top": 5

      },

        "visible": false, // this will make it not visible by default - click "eye" to make visible

        "version": "1.2"

    },

 

3. Add widget to \client\stemapp\config.json in the "widgetOnScreen.widgets" array

    {

      "uri": "widgets/AddrRoadSearchZoom/Widget",

      "position": {

        "left": 45,

        "top": 5

      }

    },

 

4. Create a new web app. The widget button should be visible in the widgets tab.

 

 

Widget display order for on screen widgets is alphabetical and doesn't appear to be able to be changed in any config files.

Outcomes