Changeset 7453

Show
Ignore:
Timestamp:
02/26/07 01:37:47 (23 months ago)
Author:
liucougar
Message:

fixes #1229 by introducing a div to cover the entire area occupied by a splitcontainer. the div is under the sizer

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/widget/SplitContainer.js

    r7313 r7453  
    6262                // to keep other combined css classes from inadvertantly making the overflow visible 
    6363                if (dojo.render.html.moz) { 
    64                         this.domNode.style.overflow = '-moz-scrollbars-none'; // hidden doesn't work 
    65                 } 
    66                  
     64                        this.domNode.style.overflow = '-moz-scrollbars-none'; // hidden doesn't work 
     65                } 
     66 
    6767                var content = dojo.html.getContentBox(this.domNode); 
    6868                this.paneWidth = content.width; 
     
    7575                this.paneHeight = content.height; 
    7676                this._layoutPanels(); 
     77                if(this.cover){ 
     78                        this._updateCoverSize(); 
     79                } 
    7780        }, 
    7881 
     
    340343        }, 
    341344 
     345        _updateCoverSize: function(){ 
     346                this.cover.style.width=this.paneWidth+"px"; 
     347                this.cover.style.height=this.paneHeight+"px"; 
     348        }, 
    342349        beginSizing: function(e, i){ 
    343350                this.paneBefore = this.children[i]; 
     
    346353                this.isSizing = true; 
    347354                this.sizingSplitter = this.sizers[i]; 
     355 
     356                if(!this.cover){ 
     357                        this.cover = dojo.doc().createElement('div'); 
     358                        this.domNode.appendChild(this.cover); 
     359                        var s = this.cover.style; 
     360                        s.position='absolute'; 
     361                        s.zIndex=1; 
     362                        s.top=0; 
     363                        s.left=0; 
     364                        this._updateCoverSize(); 
     365                }else{ 
     366                        this.cover.style.display=""; 
     367                } 
     368                this.sizingSplitter.style.zIndex=2; 
     369                 
    348370                this.originPos = dojo.html.getAbsolutePosition(this.children[0].domNode, true, dojo.html.boxSizing.MARGIN_BOX); 
    349371                if (this.isHorizontal){ 
     
    386408 
    387409        endSizing: function(e){ 
    388  
     410                if(this.cover){ 
     411                        this.cover.style.display='none'; 
     412                } 
    389413                if (!this.activeSizing){ 
    390414                        this._hideSizingLine();