From: Alan Knowles Date: Fri, 7 Dec 2018 06:42:43 +0000 (+0800) Subject: Roo/bootstrap/layout/South.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=c3427c71edb63ae9295c4793c7500cafb9308700 Roo/bootstrap/layout/South.js --- diff --git a/Roo/bootstrap/layout/South.js b/Roo/bootstrap/layout/South.js index e69de29bb2..0bfb80a47a 100644 --- a/Roo/bootstrap/layout/South.js +++ b/Roo/bootstrap/layout/South.js @@ -0,0 +1,49 @@ + + + + +Roo.bootstrap.layout.South = function(config){ + config.region = 'south'; + config.cursor = 's-resize'; + Roo.bootstrap.layout.Split.call(this, config); + if(this.split){ + this.split.placement = Roo.bootstrap.SplitBar.BOTTOM; + this.split.orientation = Roo.bootstrap.SplitBar.VERTICAL; + this.split.el.addClass("roo-layout-split-v"); + } + var size = config.initialSize || config.height; + if(typeof size != "undefined"){ + this.el.setHeight(size); + } +}; + +Roo.extend(Roo.bootstrap.layout.South, Roo.bootstrap.layout.Split, { + orientation: Roo.bootstrap.SplitBar.VERTICAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + var sh = this.split.el.getHeight(); + box.height += sh; + box.y -= sh; + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + var sh = this.split.el.getHeight(); + box.height -= sh; + box.y += sh; + this.split.el.setLeft(box.x); + this.split.el.setTop(box.y-sh); + this.split.el.setWidth(box.width); + } + if(this.collapsed){ + this.updateBody(box.width, null); + } + Roo.bootstrap.layout.Region.prototype.updateBox.call(this, box); + } +});