Select to view content in your preferred language

disable/hide resize handle for Widget

5890
20
07-02-2015 10:46 AM
VikramS
Frequent Contributor

How to disable/hide the resize handle for specific widget in Webappbuilder ?

0 Kudos
20 Replies
KevinThompson
Regular Contributor

Hey Robert,

Your right I just noticed! I also can't use .dojox_layout_ResizeHandle_2 as every time you open and close a widget the id changes. I guess its back to trouble shooting the JS. Is there anything I am doing wrong within the Widget.js file?

Currently I just added the code to the bottom after the refreshLegend function.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Your widget does not already have a postCreate function?

0 Kudos
KevinThompson
Regular Contributor

I have no existing postcreate function within the Basemap Gallery Widget.js I had to add the postcreate function to the file.

The only file which contains an existing postcreate function is the Jimu.js WidgetPlaceholder.js file?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Kevin,

   Was the attached Widget.js suppose to have any of your code change attempts?

0 Kudos
KevinThompson
Regular Contributor

Hey Robert,

That was a blank copy of the file to show there was no base postcreate function here is my failed code

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Kevin,

   OK in that one you have the postCreate function added but you did not add the defines for the domStyle or dojoQuery.

define([
    'dojo/_base/declare',
    'dijit/_WidgetsInTemplateMixin',
    "dojo/Deferred",
    'jimu/BaseWidget',
    'jimu/portalUtils',
    'jimu/PanelManager',
    'jimu/portalUrlUtils',
    'jimu/utils',
    "esri/dijit/Basemap",
    "esri/dijit/BasemapLayer",
    'esri/dijit/BasemapGallery',
    "./a11y/Widget",
    'dojo/_base/lang',
    'dojo/_base/array',
    "dojo/_base/html",
    "dojo/query",
    'dojo/on',
    'dojo/promise/all',
    './utils',
    'dojo/query',
    'dojo/dom-style',
    'jimu/dijit/LoadingIndicator',
  ],
  function(
    declare,
    _WidgetsInTemplateMixin,
    Deferred,
    BaseWidget,
    portalUtils,
    PanelManager,
    portalUrlUtils,
    jimuUtils,
    Basemap,
    BasemapLayer,
    BasemapGallery,
    a11y,
    lang,
    array,
    html,
    query,
    on,
    all,
    utils,
    dojoQuery, 
    domStyle) {
....
0 Kudos
KevinThompson
Regular Contributor

Hello Robert,

I just checked and the code does work until you restart the widget and then it pops back for some reason.

I appreciate your patience with this! I am sure its working fine on your end.

Kevin

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Kevin,

   It is working fine on my end, lol. Here is the full basemap gallery widget code with changes:

0 Kudos
KevinThompson
Regular Contributor

Robert,

I just notice that the code only works on my end for the first time the widget is opened and then if it is closed it stops working. This might be due to some of my changes within the application. I will see if I can find out what is causing it.

Thank you for your help!! Your the best

PS: I got the logo in the header widget to be larger! Thanks for the links this morning

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Kevin,

   That is strange. I can open and close it as many times as I want and it stays gone.

0 Kudos