Changeset 8

Show
Ignore:
Timestamp:
08/25/08 03:07:14 (4 years ago)
Author:
tsuckowhomberg
Message:
  • fixed: wrong calculation of "start"-parameter for the buffer-request caused infinite loop. Adjusted calculation of return value in "getPredictedBufferIndex()" to always return correct value for "start"-parameter if the "nearLimit" property is greater than or equals to half of store's "bufferSize" property (fixes google issue 4)
Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG

    r6 r8  
    1 Version 0.1.1 
     1Version 0.1.2 
     225-August-2008 
     3 
     4- fixes: 
     5 - BufferedGridView: wrong calculation of "start"-parameter for the buffer-request 
     6caused infinite loop. Adjusted calculation of return value in "getPredictedBufferIndex()" 
     7to always return correct value for "start"-parameter if the "nearLimit" property is greater 
     8than or equals to half of store's "bufferSize" property (fixes google issue 4) 
     9 
     10Version 0.1.1 
    21125-August-2008 
    312 
  • trunk/src/BufferedGridView.js

    r6 r8  
    12021202        var lastRowIndex = Math.min(this.ds.totalLength-1, 
    12031203                                    rowIndex + this.visibleRows); 
     1204 
    12041205        return (rowIndex     >= this.ds.bufferRange[0]) && 
    12051206               (lastRowIndex <= this.ds.bufferRange[1]); 
     
    12161217    { 
    12171218        if (!inRange) { 
    1218             return Math.max(0, index-(2*this.nearLimit)); 
     1219            var dNear = 2*this.nearLimit; 
     1220            return Math.max(0, index-((dNear >= this.ds.bufferSize ? this.nearLimit : dNear))); 
    12191221        } 
    12201222        if (!down) { 
     
    13161318 
    13171319        var bufferOffset = this.getPredictedBufferIndex(index, inRange, down); 
    1318         var fetchSize    = this.ds.bufferSize; 
    13191320 
    13201321        if (!inRange) {