Skip to content

Commit b81ca9d

Browse files
committed
0.5.19
1 parent a3180fb commit b81ca9d

File tree

4 files changed

+1417
-225
lines changed

4 files changed

+1417
-225
lines changed

dist/jquery.dgtable.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* jquery.dgtable 0.5.18
2+
* jquery.dgtable 0.5.19
33
* git://github.com/danielgindi/jquery.dgtable.git
44
*/
55

@@ -121,7 +121,7 @@ return /******/ (function(modules) { // webpackBootstrap
121121
* @expose
122122
* @type {string}
123123
*/
124-
DGTable.VERSION = '0.5.18';
124+
DGTable.VERSION = '0.5.19';
125125

126126
/**
127127
* @public
@@ -562,7 +562,7 @@ return /******/ (function(modules) { // webpackBootstrap
562562
*/
563563
DGTable.prototype._parseColumnWidth = function (width, minWidth) {
564564

565-
var widthSize = parseFloat(width),
565+
var widthSize = Math.max(0, parseFloat(width)),
566566
widthMode = ColumnWidthMode.AUTO; // Default
567567

568568
if (widthSize > 0) {
@@ -1779,20 +1779,20 @@ return /******/ (function(modules) { // webpackBootstrap
17791779
};
17801780

17811781
/**
1782-
* Returns the y pos of a row by physical index
1782+
* Returns the y pos of a row by index
17831783
* @public
17841784
* @expose
1785-
* @param {Number} physicalRowIndex - index of the row
1785+
* @param {Number} rowIndex - index of the row
17861786
* @returns {Number|null} Y pos
17871787
*/
1788-
DGTable.prototype.getRowYPos = function (physicalRowIndex) {
1788+
DGTable.prototype.getRowYPos = function (rowIndex) {
17891789
var that = this,
17901790
p = that.p;
17911791

17921792
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;
17941794
} else {
1795-
var row = p.tbody.childNodes[physicalRowIndex];
1795+
var row = p.tbody.childNodes[rowIndex];
17961796
return row ? row.offsetTop : null;
17971797
}
17981798
};
@@ -1960,7 +1960,7 @@ return /******/ (function(modules) { // webpackBootstrap
19601960
$thisWrapper.remove();
19611961
}
19621962

1963-
return detectedWidth;
1963+
return Math.max(0, detectedWidth);
19641964
};
19651965

19661966
/**
@@ -2090,7 +2090,7 @@ return /******/ (function(modules) { // webpackBootstrap
20902090
}
20912091
}
20922092

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
20942094

20952095
var minColumnWidthRelative = o.minColumnWidth / detectedWidth;
20962096
if (isNaN(minColumnWidthRelative)) {
@@ -3115,6 +3115,7 @@ return /******/ (function(modules) { // webpackBootstrap
31153115
}
31163116
}
31173117

3118+
sizeLeft = Math.max(1, sizeLeft);
31183119
sizeToSet = width / sizeLeft;
31193120

31203121
if (relatives > 0) {

dist/jquery.dgtable.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)