incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtu...@apache.org
Subject svn commit: r540759 - /incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js
Date Tue, 22 May 2007 21:10:47 GMT
Author: mturyn
Date: Tue May 22 14:10:45 2007
New Revision: 540759

URL: http://svn.apache.org/viewvc?view=rev&rev=540759
Log:
Guarded against setting margin boxes of nodes that might not be there yet.

No change in scroll bars in this version.

Modified:
    incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js

Modified: incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js?view=diff&rev=540759&r1=540758&r2=540759
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js (original)
+++ incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js Tue May 22 14:10:45 2007
@@ -312,7 +312,7 @@
 					// ...whereas _we_ set this, and know
 					// it to be a number giving the width
 					// in pixels:
-					this.domNode.style.width = this._tableLayoutModel.resedWidthPx+"px";
+					this.domNode.style.width = this._tableLayoutModel.resetWidthPx+"px";
 				}
 			}
 	
@@ -354,8 +354,11 @@
 		
 	
 			if (dojo.render.html.ie){
-				dojo.html.setMarginBox( this.headerRow.childNodes[i],
-					widthObj ) ;
+				
+				if( this.headerRow.childNodes[i] ){			
+					dojo.html.setMarginBox( this.headerRow.childNodes[i],
+						widthObj ) ;
+				}
 					
 				widthObj = dojo.html.getMarginBox( this.headerRow.childNodes[i]) ;
 				delete widthObj.height ;
@@ -365,20 +368,24 @@
 						widthObj) ;					
 				}
 			}
-			else{
+			else {
 				// Cols are direct children of headerTable;
 				// they're evidently sufficient under mozilla to
 				// set the columns on-screen:
-				dojo.html.setMarginBox(
-									this.headerTable.childNodes[i],
-									widthObj
-										) ;
-				widthObj = dojo.html.getMarginBox( this.headerTable.childNodes[i]) ;
-				delete widthObj.height ;										
-				dojo.html.setMarginBox(
-									this.table.childNodes[i],
-									widthObj
-										) ;										
+				if(this.headerTable.childNodes[i]){
+					dojo.html.setMarginBox(
+										this.headerTable.childNodes[i],
+										widthObj
+											) ;
+				}
+				if(this.table.childNodes[i]){
+					widthObj = dojo.html.getMarginBox( this.headerTable.childNodes[i]) ;
+					delete widthObj.height ;										
+					dojo.html.setMarginBox(
+										this.table.childNodes[i],
+										widthObj
+											) ;										
+				}
 			}
 			if (this.headerRow.childNodes[i] && this.headerRow.childNodes[i].childNodes[0]){
 				this.headerRow.childNodes[i].childNodes[0].style.width = "100%";
@@ -668,7 +675,7 @@
 		var fWidth = (dojo.html.getContentBox(this.domNode)).width ; 
 
 
-		this._tableLayoutModel.resedWidthPx= fWidth ;
+		this._tableLayoutModel.resetWidthPx= fWidth ;
 
 		// We no longer care what 
 		// the width initally was



Mime
View raw message