AW.Grid.Controllers.Overflow.adjustScrollBars = function(){
var e = this.getScrollTemplate().element();
if (!e) {return}
var s, x, y;
var l = this.getScrollLeft();
var t = this.getScrollTop();
var w = this.getScrollWidth();
var h = this.getScrollHeight();
var ww = e.offsetWidth;
var hh = e.offsetHeight;
if (AW.ie6 && AW.strict) {
this.setTimeout(function(){
var e = this.getScrollTemplate().element();
if (e) {
e.lastChild.style.width = (ww-20) + "px";
e.lastChild.style.height = (hh-20) + "px";
e = null;
}
});
}
if (w < ww && h < hh){
s = "none";
x = 0;
y = 0;
}
else if (w < ww - 16){
s = "vertical";
x = 20;
y = 0;
}
else if (h < hh - 16){
s = "horizontal";
x = 0;
y = 20;
}
else {
s = "both";
x = 20;
y = 20;
}
if (this.getScrollBars() != s) {
this.setScrollBars(s);
}
if (w - l < ww - x){
var ll = Math.max(0, w - ww + x);
if (ll != l) {
this.setScrollLeft(ll);
}
}
if (h - t < hh - y){
var tt = Math.max(0, h - hh + y);
if (tt != t ) {
this.setScrollTop(tt);
}
}
this.setContentHeight(hh - y - this.getContentHeight(0) - this.getContentHeight(2), 1);
this.setContentWidth(ww - x - this.getContentWidth(0) - this.getContentWidth(2), 1);
};
if (AW.ie6 && AW.strict) {
this.setTimeout(function(){
var e = this.getScrollTemplate().element();
if (e) {
e.lastChild.style.width = (ww-20) + "px";
e.lastChild.style.height = (hh-20) + "px";
e = null;
}
});
}
This topic is archived.