Changeset 13
- Timestamp:
- 08/29/08 22:25:15 (4 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
CHANGELOG (modified) (1 diff)
-
src/BufferedGridView.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r11 r13 1 Version 0.2rc1 1 Version 0.2rc2 2 29-August-2008 3 4 - fixes: 5 - BufferedGridView.js: re-rendering rows would not work proper if a resize of the panel 6 during buffering happened; "adjustVisibleRows()" skips recalculating the "rowIndex" 7 property now if the livegrid is currently buffering. "replaceLiveRows()" would not always 8 calculate the exact range of rows to render; adjusted conditions to check for valid ranges 9 10 Version 0.2rc1 2 11 29-August-2008 3 12 -
trunk/src/BufferedGridView.js
r11 r13 454 454 } 455 455 456 457 456 // adjust the number of visible rows and the height of the scroller. 458 457 this.adjustVisibleRows(); 459 458 this.adjustBufferInset(); 460 461 459 462 460 this.onLayout(vw, vh); … … 1433 1431 var cursorBuffer = cursor-this.ds.bufferRange[0]; 1434 1432 1433 // compute the last possible renderindex 1434 var lpIndex = Math.min(cursorBuffer+this.visibleRows-1, this.ds.bufferRange[1]-this.ds.bufferRange[0]); 1435 1435 1436 // we can skip checking for append or prepend if the spill is larger than 1436 1437 // visibleRows. We can paint the whole rows new then- … … 1438 1439 this.mainBody.update(this.renderRows( 1439 1440 cursorBuffer, 1440 cursorBuffer+this.visibleRows-11441 lpIndex 1441 1442 )); 1442 1443 } else { 1443 1444 if (append) { 1444 1445 this.removeRows(0, spill-1); 1445 1446 if (cursor+this.visibleRows-1 < this.ds.bufferRange[1]) { 1447 var html = this.renderRows(cursorBuffer+this.visibleRows-spill, 1448 cursorBuffer+this.visibleRows-1); 1446 if (cursorBuffer+this.visibleRows-spill < this.ds.bufferRange[1]-this.ds.bufferRange[0]) { 1447 var html = this.renderRows( 1448 cursorBuffer+this.visibleRows-spill, 1449 lpIndex 1450 ); 1449 1451 Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html); 1450 1452 } 1453 1451 1454 } else { 1452 1455 this.removeRows(this.visibleRows-spill, this.visibleRows-1); … … 1562 1565 this.visibleRows = visibleRows; 1563 1566 1567 // skip recalculating the row index if we are currently buffering. 1568 if (this.isBuffering) { 1569 return; 1570 } 1564 1571 if (this.rowIndex + visibleRows > totalLength) { 1565 1572 this.rowIndex = Math.max(0, totalLength-visibleRows); … … 1568 1575 1569 1576 this.updateLiveRows(this.rowIndex, true); 1570 1571 1577 }, 1572 1578
