Bug #3200 » 0001-Fix-a-WTableView-scrollTo-Loading-issue.patch
| src/Wt/WTableView.C | ||
|---|---|---|
|
if (isRendered()) {
|
||
|
WStringStream s;
|
||
|
s << "setTimeout(function() { jQuery.data("
|
||
|
s << "jQuery.data("
|
||
|
<< jsRef() << ", 'obj').setScrollToPending();"
|
||
|
<< "setTimeout(function() { jQuery.data("
|
||
|
<< jsRef() << ", 'obj').scrollTo(-1, "
|
||
|
<< rowY << "," << (int)hint << "); }, 0);";
|
||
| src/js/WTableView.js | ||
|---|---|---|
|
}
|
||
|
var scrollX1 = 0, scrollX2 = 0, scrollY1 = 0, scrollY2 = 0;
|
||
|
var scrollToPending = false;
|
||
|
/*
|
||
|
* We need to remember this for when going through a hide()
|
||
| ... | ... | |
|
return;
|
||
|
if (contentsContainer.clientWidth && contentsContainer.clientHeight
|
||
|
&& (!scrollToPending)
|
||
|
&& (contentsContainer.scrollTop < scrollY1
|
||
|
|| contentsContainer.scrollTop > scrollY2
|
||
|
|| contentsContainer.scrollLeft < scrollX1
|
||
| ... | ... | |
|
headerColumnsContainer.scrollTop = scrollTop;
|
||
|
};
|
||
|
this.setScrollToPending = function() {
|
||
|
scrollToPending = true;
|
||
|
};
|
||
|
this.scrollToPx = function(x, y) {
|
||
|
scrollTop = y;
|
||
|
scrollLeft = x;
|
||
| ... | ... | |
|
};
|
||
|
this.scrollTo = function(x, y, hint) {
|
||
|
scrollToPending = false;
|
||
|
if (y != -1) {
|
||
|
var top = contentsContainer.scrollTop,
|
||
|
height = contentsContainer.clientHeight;
|
||
- « Previous
- 1
- 2
- Next »