Code: Select all
this.id = id;
this.size = this.min = 45; // --- Adjust MINIMUM_BLOCK_HEIGHT here :-)
this.extra = 5; // --- This is added to height when expanded
this.margin = 20; // --- Hide [expand] command if just a few pixels height when expanded.
Code: Select all
o.style.height = 'auto';
o.style.overflow = 'visible';
Code: Select all
if( (o.scrollHeight + this.extra) > screen.height-300 )
{
o.style.height = screen.height-300;
}
else
{
o.style.height = 'auto';
}
o.style.overflow = 'auto';
Code: Select all
if( o.scrollHeight <= this.min ) { x.innerHTML = ''; return; }
Code: Select all
if( o.scrollHeight <= this.min ) { x.innerHTML = ''; o.style.height = 'auto'; return; }
Code: Select all
if( (o.scrollHeight + this.extra) > screen.height-300 )
{
o.style.height = screen.height-300;
}
else
{
o.style.height = 'auto';
}
o.style.overflow = 'auto';
Code: Select all
if( (o.scrollHeight + this.extra) > screen.height - 200 )
{
o.style.height = screen.height - 200; // add scrollbar if visible area bigger than window
o.style.overflow = 'auto';
}
else
{
o.style.height = 'auto';
o.style.overflow = 'visible';
}