incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r529424 - /incubator/xap/trunk/codebase/src/xap/widgets/dojo/BorderPanel.js
Date Mon, 16 Apr 2007 22:47:35 GMT
Author: jmargaris
Date: Mon Apr 16 15:47:34 2007
New Revision: 529424

URL: http://svn.apache.org/viewvc?view=rev&rev=529424
Log:
calling layout with the actual children so that resizeTo
and onResized get called correctly on them

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

Modified: incubator/xap/trunk/codebase/src/xap/widgets/dojo/BorderPanel.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/widgets/dojo/BorderPanel.js?view=diff&rev=529424&r1=529423&r2=529424
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/widgets/dojo/BorderPanel.js (original)
+++ incubator/xap/trunk/codebase/src/xap/widgets/dojo/BorderPanel.js Mon Apr 16 15:47:34 2007
@@ -52,18 +52,23 @@
 		
 		if (position=="north"){
 			this.north = child;
+			child.layoutAlign = "top";
 		}
 		else if (position=="south"){
 			this.south = child;
+			child.layoutAlign = "bottom";
 		}
 		else if (position=="east"){
 			this.east = child;
+			child.layoutAlign = "right";
 		}
 		else if (position=="west"){
 			this.west = child;
+			child.layoutAlign = "left";
 		}
 		else{
 			this.center = child;
+			child.layoutAlign = "client";
 		}
 		xap.widgets.dojo.BorderPanel.superclass.addChild.call(this,child);
 		if (!this._resizePending){
@@ -113,24 +118,7 @@
     		return;
     	}
     	this._resizePending = false;
-		var children = [];
-
-		if ( this.north ){
-			children.push({domNode: this.north.domNode, layoutAlign: "top"});
-		}
-		if ( this.south ){
-			children.push({domNode: this.south.domNode, layoutAlign: "bottom"});
-		}
-		if ( this.west ){
-			children.push({domNode: this.west.domNode, layoutAlign: "left"});
-		}
-		if ( this.east ){
-			children.push({domNode: this.east.domNode, layoutAlign: "right"});
-		}
-		if ( this.center ){
-			children.push({domNode: this.center.domNode, layoutAlign: "client"});
-		}
-		dojo.widget.html.layout(this.domNode,children);
+		dojo.widget.html.layout(this.domNode,this.children);
 	}
 }
 );



Mime
View raw message