How do you remove the maximize/dock in the top right button from the default popup?

4346
2
Jump to solution
05-24-2016 06:23 AM
JustinJackson
New Contributor


Is there an option to turn it off?  Would I have to make my own popup class?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
KristianEkenes
Esri Regular Contributor

There's actually an easier way to do this with JavaScript. I recommend not overriding it with CSS as this can cause some issues when upgrading to future versions.

The popup has a dockOptions property which has an option to disable this button: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#dockOptions

Simply do the following:

view.popup.dockOptions.buttonEnabled = false;

Or

var view = new MapView({
        container: "viewDiv",
        map: map,
        center: [-73.950, 40.702],
        zoom: 11,
        popup: {
          dockOptions: {
            buttonEnabled: false
          }
        }
      });

When constructing your view.

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Justin,

  Just add some css to remove that from the popup

.esriPopup .titleButton.maximize {

        display: none;

      }

KristianEkenes
Esri Regular Contributor

There's actually an easier way to do this with JavaScript. I recommend not overriding it with CSS as this can cause some issues when upgrading to future versions.

The popup has a dockOptions property which has an option to disable this button: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#dockOptions

Simply do the following:

view.popup.dockOptions.buttonEnabled = false;

Or

var view = new MapView({
        container: "viewDiv",
        map: map,
        center: [-73.950, 40.702],
        zoom: 11,
        popup: {
          dockOptions: {
            buttonEnabled: false
          }
        }
      });

When constructing your view.