From 2187d2fb7152511b7fb1c07f19163b60c24d6711 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 7 Dec 2018 14:41:45 +0800 Subject: [PATCH] Roo/bootstrap/layout/East.js --- Roo/bootstrap/layout/East.js | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Roo/bootstrap/layout/East.js diff --git a/Roo/bootstrap/layout/East.js b/Roo/bootstrap/layout/East.js new file mode 100644 index 0000000000..dadf04478a --- /dev/null +++ b/Roo/bootstrap/layout/East.js @@ -0,0 +1,45 @@ + +Roo.bootstrap.layout.East = function(config){ + config.region = "east"; + config.cursor = "e-resize"; + Roo.bootstrap.layout.Split.call(this, config); + if(this.split){ + this.split.placement = Roo.bootstrap.SplitBar.RIGHT; + this.split.orientation = Roo.bootstrap.SplitBar.HORIZONTAL; + this.split.el.addClass("roo-layout-split-h"); + } + var size = config.initialSize || config.width; + if(typeof size != "undefined"){ + this.el.setWidth(size); + } +}; +Roo.extend(Roo.bootstrap.layout.East, Roo.bootstrap.layout.Split, { + orientation: Roo.bootstrap.SplitBar.HORIZONTAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + var sw = this.split.el.getWidth(); + box.width += sw; + box.x -= sw; + } + 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); + this.split.el.setTop(box.y); + this.split.el.setHeight(box.height); + box.x += sw; + } + if(this.collapsed){ + this.updateBody(null, box.height); + } + Roo.bootstrap.layout.Region.prototype.updateBox.call(this, box); + } +}); -- 2.39.2