possibly fix max autoPadding height+border problem
An element with a border has a child with no height or width properties, but a left and top of 0: this causes the child elements background to cover the bottom and right borders. It doesn't have a `position.right`, but `iright` still needs to be subtracted.
This commit is contained in:
parent
214ad84a66
commit
8460e1c8a0
|
@ -2417,9 +2417,9 @@ Element.prototype._getWidth = function(get) {
|
|||
&& this.position.left !== 'center') {
|
||||
width -= this.parent.ileft;
|
||||
}
|
||||
if (this.position.right != null) {
|
||||
//if (this.position.right != null) {
|
||||
width -= this.parent.iright;
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2461,9 +2461,9 @@ Element.prototype._getHeight = function(get) {
|
|||
&& this.position.top !== 'center') {
|
||||
height -= this.parent.itop;
|
||||
}
|
||||
if (this.position.bottom != null) {
|
||||
//if (this.position.bottom != null) {
|
||||
height -= this.parent.ibottom;
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2513,9 +2513,9 @@ Element.prototype._getRight = function(get) {
|
|||
if (this.position.right == null && this.position.left != null) {
|
||||
right = this.screen.cols - (this._getLeft(get) + this._getWidth(get));
|
||||
if (this.screen.autoPadding) {
|
||||
if (this.position.right != null) {
|
||||
//if (this.position.right != null) {
|
||||
right += this.parent.iright;
|
||||
}
|
||||
//}
|
||||
}
|
||||
return right;
|
||||
}
|
||||
|
@ -2523,9 +2523,9 @@ Element.prototype._getRight = function(get) {
|
|||
right = (parent.right || 0) + (this.position.right || 0);
|
||||
|
||||
if (this.screen.autoPadding) {
|
||||
if (this.position.right != null) {
|
||||
//if (this.position.right != null) {
|
||||
right += this.parent.iright;
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
return right;
|
||||
|
@ -2574,9 +2574,9 @@ Element.prototype._getBottom = function(get) {
|
|||
if (this.position.bottom == null && this.position.top != null) {
|
||||
bottom = this.screen.rows - (this._getTop(get) + this._getHeight(get));
|
||||
if (this.screen.autoPadding) {
|
||||
if (this.position.bottom != null) {
|
||||
//if (this.position.bottom != null) {
|
||||
bottom += this.parent.ibottom;
|
||||
}
|
||||
//}
|
||||
}
|
||||
return bottom;
|
||||
}
|
||||
|
@ -2584,9 +2584,9 @@ Element.prototype._getBottom = function(get) {
|
|||
bottom = (parent.bottom || 0) + (this.position.bottom || 0);
|
||||
|
||||
if (this.screen.autoPadding) {
|
||||
if (this.position.bottom != null) {
|
||||
//if (this.position.bottom != null) {
|
||||
bottom += this.parent.ibottom;
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
return bottom;
|
||||
|
|
Loading…
Reference in New Issue