Setting height/width of Custom On Screen Widget

1475
9
Jump to solution
12-03-2014 12:17 PM
SimonFisher
Occasional Contributor II

What's the easiest way to set the height/width of a on screen widget?  Is it suppose to work via config or do I need to alter in CSS or JavaScript?

I thought it would be in the config or manifest like this below, but it doesn't seem to be working for me.

    "properties": {

        "inPanel": true,

        "hasLocale": true,

        "hasStyle": true,

        "hasConfig": true,

        "hasUIFile": true,

        "hasSettingPage": false,

        "hasSettingUIFile": false,

        "hasSettingLocale": false,

        "hasSettingStyle": false,

        "IsController": false,

        "openAtStart": true,

    "positionRelativeTo": "map",

      "position": {

        "left": 0,

        "top": 0,

        "right": 0,

        "bottom": 30,

        "width": 400,

        "height": 650

      },"openAtStart": true

    }

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Simon,

  my example is for an in-Panel widget. I have not tested other types.

View solution in original post

0 Kudos
9 Replies
RobertScheitlin__GISP
MVP Emeritus

Simon,

Setting the width and height in the apps config.json after it is created work for me:

     {
        "position": {
          "left": 55,
          "top": 45,
          "width": 600,
          "height": 410
        },
        "placeholderIndex": 1,
        "id": "_5",
        "positionRelativeTo": "map",
        "name": "eSearch",
        "openAtStart": true,
        "label": "Enhanced Search",
        "isThemeWidget": false,
        "uri": "widgets/eSearch/Widget",
        "config": "widgets/eSearch/config_Enhanced Search.json"
      },
SimonFisher
Occasional Contributor II

Do you know if this works for both In-panel and off-panel widgets?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Simon,

  my example is for an in-Panel widget. I have not tested other types.

0 Kudos
SimonFisher
Occasional Contributor II

Looks like that is the issue the position and height/width only seem to be valid for in-panel widgets.

Thanks Robert

0 Kudos
SimonFisher
Occasional Contributor II

Does anyone know if it's possible to alter height/width of the side locked widgets launched from the header?  Setting these properties doesn't seem to work for those ones.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Simon,

    Are you talking about in the Tab theme?

0 Kudos
SimonFisher
Occasional Contributor II

No I'm actually using the Foldable theme.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Simon,

   Those are not meant to be messed with. The app controls the appearance of those widgets though code based on its responsive design (how it handles tables and mobile devices).

SimonFisher
Occasional Contributor II

So if I change the width of those panels in css or js it will mess up the responsive UI?

0 Kudos