X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsrc%2FRoo_bootstrap_layout_West.js.html;fp=docs%2Fsrc%2FRoo_bootstrap_layout_West.js.html;h=981eec1fbd698ab8ee021f08256bee14f6d045eb;hb=9ff8ded6bbbd258ecd646184ba26020874e2c085;hp=0000000000000000000000000000000000000000;hpb=2542b67d1a0768025056f2f330bfe50b64d1ad38;p=roojs1 diff --git a/docs/src/Roo_bootstrap_layout_West.js.html b/docs/src/Roo_bootstrap_layout_West.js.html new file mode 100644 index 0000000000..981eec1fbd --- /dev/null +++ b/docs/src/Roo_bootstrap_layout_West.js.html @@ -0,0 +1,50 @@ +/home/alan/gitlive/roojs1/Roo/bootstrap/layout/West.js +Roo.bootstrap.layout.West = function(config){ + config.region = "west"; + config.cursor = "w-resize"; + + Roo.bootstrap.layout.Split.call(this, config); + if(this.split){ + this.split.placement = Roo.bootstrap.SplitBar.LEFT; + this.split.orientation = Roo.bootstrap.SplitBar.HORIZONTAL; + this.split.el.addClass("roo-layout-split-h"); + } + +}; +Roo.extend(Roo.bootstrap.layout.West, Roo.bootstrap.layout.Split, { + orientation: Roo.bootstrap.SplitBar.HORIZONTAL, + + onRender: function(ctr, pos) + { + Roo.bootstrap.layout.West.superclass.onRender.call(this, ctr,pos); + var size = this.config.initialSize || this.config.width; + if(typeof size != "undefined"){ + this.el.setWidth(size); + } + }, + + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + box.width += this.split.el.getWidth(); + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + var sw = this.split.el.getWidth(); + box.width -= sw; + this.split.el.setLeft(box.x+box.width); + this.split.el.setTop(box.y); + this.split.el.setHeight(box.height); + } + if(this.collapsed){ + this.updateBody(null, box.height); + } + Roo.bootstrap.layout.Region.prototype.updateBox.call(this, box); + } +}); \ No newline at end of file