fix layout height calc
[roojs1] / Roo / bootstrap / layout / East.js
1
2 Roo.bootstrap.layout.East = function(config){
3     config.region = "east";
4     config.cursor = "e-resize";
5     Roo.bootstrap.layout.Split.call(this, config);
6     if(this.split){
7         this.split.placement = Roo.bootstrap.SplitBar.RIGHT;
8         this.split.orientation = Roo.bootstrap.SplitBar.HORIZONTAL;
9         this.split.el.addClass("roo-layout-split-h");
10     }
11     
12 };
13 Roo.extend(Roo.bootstrap.layout.East, Roo.bootstrap.layout.Split, {
14     orientation: Roo.bootstrap.SplitBar.HORIZONTAL,
15     
16     onRender : function(ctr, pos)
17     {
18         Roo.bootstrap.layout.Split.prototype.onRender.call(this, ctr, pos);
19         var size = this.config.initialSize || this.config.width;
20         if(this.el && typeof size != "undefined"){
21             this.el.setWidth(size);
22         }
23     
24     },
25     
26     getBox : function(){
27         if(this.collapsed){
28             return this.collapsedEl.getBox();
29         }
30         var box = this.el.getBox();
31         if(this.split){
32             var sw = this.split.el.getWidth();
33             box.width += sw;
34             box.x -= sw;
35         }
36         return box;
37     },
38
39     updateBox : function(box){
40         if(this.split && !this.collapsed){
41             var sw = this.split.el.getWidth();
42             box.width -= sw;
43             this.split.el.setLeft(box.x);
44             this.split.el.setTop(box.y);
45             this.split.el.setHeight(box.height);
46             box.x += sw;
47         }
48         if(this.collapsed){
49             this.updateBody(null, box.height);
50         }
51         Roo.bootstrap.layout.Region.prototype.updateBox.call(this, box);
52     }
53 });