Close AreaMeasurement2D panel

124
1
11-12-2019 03:10 PM
GregoryBologna
Occasional Contributor

I am using AreaMeasurement2D.

After a measurement is made the panel stays open. I want to allow the map to be printed with the print widget so the measurement shows up in the printout. The problem is that when the print widget is enabled, the measure panel is behind it. It just looks bad. How can I close the measure panel without losing measurement on view? I can make the measure button not active but cannot get the panel to close.

        var printExpandWatch = watchUtils.watch(printExpand"expanded"function (newValueoldValue) {
          if (newValue) {
            if (activeWidget) {
               document.getElementById("areaButton").classList.remove("active");
            }           
          }
        });

Tags (1)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Esteemed Contributor

Gregory,

   If both widgets are added to their own expand then you can set the expand widgets group property.

This value associates two or more Expand widget instances with each other, allowing one instance to auto collapse when another instance in the same group is expanded.