mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 23:19:04 +01:00
Take outer container height offset into account
This commit is contained in:
parent
a6f869be64
commit
e10ace64ba
@ -57,8 +57,9 @@ var et2_dynheight = Class.extend({
|
|||||||
// Initialize the height calculation
|
// Initialize the height calculation
|
||||||
this._initialize();
|
this._initialize();
|
||||||
|
|
||||||
// Get the outer container height
|
// Get the outer container height and offset, if available
|
||||||
var oh = this.outerNode.height();
|
var oh = this.outerNode.height();
|
||||||
|
var ot = this.outerNode.offset() ? this.outerNode.offset().top : 0;
|
||||||
|
|
||||||
// Get top and height of the inner node
|
// Get top and height of the inner node
|
||||||
var it = this.innerNode.offset().top;
|
var it = this.innerNode.offset().top;
|
||||||
@ -89,7 +90,7 @@ var et2_dynheight = Class.extend({
|
|||||||
|
|
||||||
// Calculate the new height of the inner container
|
// Calculate the new height of the inner container
|
||||||
var w = this.innerNode.width();
|
var w = this.innerNode.width();
|
||||||
var h = Math.max(this.minHeight, oh - it - bh -
|
var h = Math.max(this.minHeight, oh + ot - it - bh -
|
||||||
this.innerMargin - this.outerMargin);
|
this.innerMargin - this.outerMargin);
|
||||||
this.innerNode.height(h);
|
this.innerNode.height(h);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user