Change height of foldable div dinamically

3824
4
02-09-2015 08:51 AM
MiriEshel
New Contributor III

Hi everyone,

I develop a Custom Edit widget for one of our clients. He wants the window Info to open in the buttom left part of the map.

He also wants the Edit as a foldable widget (and not a button on the map).

I can do it by:

      onOpen: function() {
        this.layers = [];
        this.disableWebMapPopup();
        this.getLayers();
        this.initEditor();
        this._onshowinfowin = on(this.map.infoWindow, "show", this.showInfoWin); 
      },

      showInfoWin: function(evt){ 
        this.location.x = this.map.extent.xmin + (this.map.extent.xmax - this.map.extent.xmin) / 12 ;
        this.location.y = this.map.extent.ymin;
        this._mapInfoWin = this.target; 
        if(html.hasClass(evt.target._contentPane.firstChild,'esriAttributeInspector')){ 
          query(".titleButton.close", this.target).style('display', 'none'); 
          query(".titleButton.maximize", this.target).style('display', 'none'); 
        }else{ 
          query(".titleButton.close", this.target).style('display', null); 
          query(".titleButton.maximize", this.target).style('display', null); 
        } 
      }, 

The problem is that the foldable widget's height takes the whole place and hides the infoWindow.

Attach with a screenshot that demonstrates the problem

What is the best way to handle with it? I see few possibilities:

1. Fire the fold-up/fold down button  every time this infoWindow is opened. If that's the way, how to do it?

2. Reduce the height all the foldable widgets.

3. Reduce the height of only the Editor foldable widget (preferable). If that's the way, how to do it?

4. Any other option?

Thanks so much,

miri

0 Kudos
4 Replies
BlakeTerhune
MVP Regular Contributor

Could you use a z-index (in CSS or javascript) to order them so the infoWindow has a higher z-index value than the foldable widget? Sorry I'm not savvy enough to whip up some code, but it might be worth investigating.

MiriEshel
New Contributor III

Hi Blake,

Thanks. That's an interesting idea. I will check how it looks.

Thanks,

Miri

0 Kudos
MiriEshel
New Contributor III

Hi Blake,

I've checked it. The z-Index of the popup Window is 40. The z-index of the jimu-container and jimu-widget-frame and editDiv is not set and I believe it's 0 by default.

According to this, it should be on top but it isn't. Am I missing something?

Thanks,

Miri

0 Kudos
BlakeTerhune
MVP Regular Contributor

Maybe try being explicit and set all of the z-indexes to what you think it should be to see if it makes a difference.

0 Kudos