|
1 | 1 | /*! |
2 | | - * jquery.dgtable 0.5.18 |
| 2 | + * jquery.dgtable 0.5.19 |
3 | 3 | * git://github.com/danielgindi/jquery.dgtable.git |
4 | 4 | */ |
5 | 5 |
|
@@ -121,7 +121,7 @@ return /******/ (function(modules) { // webpackBootstrap |
121 | 121 | * @expose |
122 | 122 | * @type {string} |
123 | 123 | */ |
124 | | - DGTable.VERSION = '0.5.18'; |
| 124 | + DGTable.VERSION = '0.5.19'; |
125 | 125 |
|
126 | 126 | /** |
127 | 127 | * @public |
@@ -562,7 +562,7 @@ return /******/ (function(modules) { // webpackBootstrap |
562 | 562 | */ |
563 | 563 | DGTable.prototype._parseColumnWidth = function (width, minWidth) { |
564 | 564 |
|
565 | | - var widthSize = parseFloat(width), |
| 565 | + var widthSize = Math.max(0, parseFloat(width)), |
566 | 566 | widthMode = ColumnWidthMode.AUTO; // Default |
567 | 567 |
|
568 | 568 | if (widthSize > 0) { |
@@ -1779,20 +1779,20 @@ return /******/ (function(modules) { // webpackBootstrap |
1779 | 1779 | }; |
1780 | 1780 |
|
1781 | 1781 | /** |
1782 | | - * Returns the y pos of a row by physical index |
| 1782 | + * Returns the y pos of a row by index |
1783 | 1783 | * @public |
1784 | 1784 | * @expose |
1785 | | - * @param {Number} physicalRowIndex - index of the row |
| 1785 | + * @param {Number} rowIndex - index of the row |
1786 | 1786 | * @returns {Number|null} Y pos |
1787 | 1787 | */ |
1788 | | - DGTable.prototype.getRowYPos = function (physicalRowIndex) { |
| 1788 | + DGTable.prototype.getRowYPos = function (rowIndex) { |
1789 | 1789 | var that = this, |
1790 | 1790 | p = that.p; |
1791 | 1791 |
|
1792 | 1792 | if (that.o.virtualTable) { |
1793 | | - return physicalRowIndex > 0 ? p.virtualRowHeightFirst + (physicalRowIndex - 1) * p.virtualRowHeight : 0; |
| 1793 | + return rowIndex > 0 ? p.virtualRowHeightFirst + (rowIndex - 1) * p.virtualRowHeight : 0; |
1794 | 1794 | } else { |
1795 | | - var row = p.tbody.childNodes[physicalRowIndex]; |
| 1795 | + var row = p.tbody.childNodes[rowIndex]; |
1796 | 1796 | return row ? row.offsetTop : null; |
1797 | 1797 | } |
1798 | 1798 | }; |
@@ -1960,7 +1960,7 @@ return /******/ (function(modules) { // webpackBootstrap |
1960 | 1960 | $thisWrapper.remove(); |
1961 | 1961 | } |
1962 | 1962 |
|
1963 | | - return detectedWidth; |
| 1963 | + return Math.max(0, detectedWidth); |
1964 | 1964 | }; |
1965 | 1965 |
|
1966 | 1966 | /** |
@@ -2090,7 +2090,7 @@ return /******/ (function(modules) { // webpackBootstrap |
2090 | 2090 | } |
2091 | 2091 | } |
2092 | 2092 |
|
2093 | | - detectedWidth = sizeLeft; // Use this as the space to take the relative widths out of |
| 2093 | + detectedWidth = Math.max(1, sizeLeft); // Use this as the space to take the relative widths out of |
2094 | 2094 |
|
2095 | 2095 | var minColumnWidthRelative = o.minColumnWidth / detectedWidth; |
2096 | 2096 | if (isNaN(minColumnWidthRelative)) { |
@@ -3115,6 +3115,7 @@ return /******/ (function(modules) { // webpackBootstrap |
3115 | 3115 | } |
3116 | 3116 | } |
3117 | 3117 |
|
| 3118 | + sizeLeft = Math.max(1, sizeLeft); |
3118 | 3119 | sizeToSet = width / sizeLeft; |
3119 | 3120 |
|
3120 | 3121 | if (relatives > 0) { |
|
0 commit comments