Changeset 15
- Timestamp:
- 08/30/08 02:36:55 (4 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
CHANGELOG (modified) (1 diff)
-
src/BufferedGridView.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r13 r15 1 Version 0.2rc2 1 Version 0.2rc3 2 30-August-2008 3 4 - fixes; 5 - BufferedGridView.js: last row would not always be rendered proper if the end of 6 records is reached and the panel would be resized so that more records are displayable 7 - enhancements: 8 - BufferedGridView.js: improved calculating the height of the buffer inset in both 9 performance and functionality. Component now working with Safari 3.1 under Windows XP 10 11 Version 0.2rc2 2 12 29-August-2008 3 13 -
trunk/src/BufferedGridView.js
r13 r15 1483 1483 // adjust the height of the scrollbar 1484 1484 1485 var contHeight = this.liveScroller.dom.parentNode.offsetHeight + 1485 var liveScrollerDom = this.liveScroller.dom; 1486 1487 var contHeight = liveScrollerDom.parentNode.offsetHeight + 1486 1488 (Ext.isGecko 1487 1489 ? ((ds.totalLength > 0 && scrollbar) … … 1491 1493 ? 0 : this.horizontalScrollOffset))) 1492 1494 1493 this.liveScroller.dom.style.height = contHeight+"px";1495 liveScrollerDom.style.height = contHeight+"px"; 1494 1496 1495 1497 if (this.rowHeight == -1) { 1496 1498 return; 1497 1499 } 1498 1499 // calculate the spill of the inner layer.1500 // spillHeight will contain the number of pixels1501 // the inner layer exceeds the scrollbar1502 var spillHeight = ((this.rowHeight*ds.totalLength)+this.hdHeight)-contHeight;1503 1500 1504 1501 // hidden rows is the number of rows which cannot be 1505 1502 // displayed and for which a scrollbar needs to be 1506 // rendered. This does alsso take clipped rows into account 1507 var hiddenRows = 0; 1508 if (spillHeight > 0) { 1509 hiddenRows = Math.ceil(spillHeight/this.rowHeight); 1510 } 1511 1512 this.liveScrollerInset.style.height = contHeight+(hiddenRows*this.rowHeight)+"px"; 1503 // rendered. This does also take clipped rows into account 1504 var hiddenRows = (ds.totalLength == this.visibleRows-this.rowClipped) 1505 ? 0 1506 : Math.max(0, ds.totalLength-(this.visibleRows-this.rowClipped)); 1507 1508 this.liveScrollerInset.style.height = (hiddenRows == 0 ? 0 : contHeight+(hiddenRows*this.rowHeight))+"px"; 1513 1509 }, 1514 1510 … … 1552 1548 1553 1549 this.rowClipped = 0; 1554 if (this.rowHeight / 3 < (vh - (visibleRows*this.rowHeight))) { 1550 // only compute the clipped row if the total length of records 1551 // exceeds the number of visible rows displayable 1552 if (totalLength > visibleRows && this.rowHeight / 3 < (vh - (visibleRows*this.rowHeight))) { 1555 1553 visibleRows = Math.min(visibleRows+1, totalLength); 1556 1554 this.rowClipped = 1; 1557 1555 } 1558 1556 1559 // adjusted condition to force rerendering of scrollbar if the 1560 // toalLength is less than visibleRows 1561 if (this.visibleRows == visibleRows) { 1557 if (this.visibleRows == visibleRows - this.rowsClipped) { 1562 1558 return; 1563 1559 } … … 1569 1565 return; 1570 1566 } 1571 if (this.rowIndex + visibleRows > totalLength) { 1572 this.rowIndex = Math.max(0, totalLength-visibleRows); 1567 // when re-rendering, doe not take the clipped row into account 1568 if (this.rowIndex + (visibleRows-this.rowClipped) > totalLength) { 1569 this.rowIndex = Math.max(0, totalLength-(visibleRows-this.rowClipped)); 1573 1570 this.lastRowIndex = this.rowIndex; 1574 1571 }
