Changeset 13

Show
Ignore:
Timestamp:
08/29/08 22:25:15 (4 years ago)
Author:
tsuckowhomberg
Message:
  • fixed: re-rendering rows would not work proper if a resize of the panel during buffering happened; "adjustVisibleRows()" skips recalculating the "rowIndex" property now if the livegrid is currently buffering
  • fixed: "replaceLiveRows()" would not always calculate the exact range of rows to render; adjusted conditions to check for valid ranges
Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG

    r11 r13  
    1 Version 0.2rc1 
     1Version 0.2rc2 
     229-August-2008 
     3 
     4- fixes: 
     5 - BufferedGridView.js: re-rendering rows would not work proper if a resize of the panel 
     6during buffering happened; "adjustVisibleRows()" skips recalculating the "rowIndex" 
     7property now if the livegrid is currently buffering. "replaceLiveRows()" would not always 
     8calculate the exact range of rows to render; adjusted conditions to check for valid ranges 
     9 
     10Version 0.2rc1 
    21129-August-2008 
    312 
  • trunk/src/BufferedGridView.js

    r11 r13  
    454454        } 
    455455 
    456  
    457456        // adjust the number of visible rows and the height of the scroller. 
    458457        this.adjustVisibleRows(); 
    459458        this.adjustBufferInset(); 
    460  
    461459 
    462460        this.onLayout(vw, vh); 
     
    14331431        var cursorBuffer = cursor-this.ds.bufferRange[0]; 
    14341432 
     1433        // compute the last possible renderindex 
     1434        var lpIndex = Math.min(cursorBuffer+this.visibleRows-1, this.ds.bufferRange[1]-this.ds.bufferRange[0]); 
     1435 
    14351436        // we can skip checking for append or prepend if the spill is larger than 
    14361437        // visibleRows. We can paint the whole rows new then- 
     
    14381439            this.mainBody.update(this.renderRows( 
    14391440                cursorBuffer, 
    1440                 cursorBuffer+this.visibleRows-1 
     1441                lpIndex 
    14411442            )); 
    14421443        } else { 
    14431444            if (append) { 
    14441445                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                    ); 
    14491451                    Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html); 
    14501452                } 
     1453 
    14511454            } else { 
    14521455                this.removeRows(this.visibleRows-spill, this.visibleRows-1); 
     
    15621565        this.visibleRows = visibleRows; 
    15631566 
     1567        // skip recalculating the row index if we are currently buffering. 
     1568        if (this.isBuffering) { 
     1569            return; 
     1570        } 
    15641571        if (this.rowIndex + visibleRows > totalLength) { 
    15651572            this.rowIndex     = Math.max(0, totalLength-visibleRows); 
     
    15681575 
    15691576        this.updateLiveRows(this.rowIndex, true); 
    1570  
    15711577    }, 
    15721578