Group Filter Modification to behave like LayerToggleButton

393
2
Jump to solution
01-14-2019 10:45 AM
ChadRicks
New Contributor III

For the Group Filter widget, how do i remove the html interface and have it behave like a toggle button? So one click it applies the filter and the second click resets the filter?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Here is what I was able to come up with. In the widget.js have these changes (lines 2 and 7):

    onOpen: function(){
      domStyle.set(this.domNode.parentNode.parentNode.parentNode, {display: "none"});
      if(!this.firstOpen) {
        this.bypassActive = true;
        this.onLayerUpdate();
      }
      this.setFilterLayerDef();
    },

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Chad,

  Do you still want to display the widgets panel?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Here is what I was able to come up with. In the widget.js have these changes (lines 2 and 7):

    onOpen: function(){
      domStyle.set(this.domNode.parentNode.parentNode.parentNode, {display: "none"});
      if(!this.firstOpen) {
        this.bypassActive = true;
        this.onLayerUpdate();
      }
      this.setFilterLayerDef();
    },