Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Commit

Permalink
v4.0.0-alpha.3 - fix 'rowspan' logic
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed Dec 7, 2016
1 parent aa98730 commit e6f8b84
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $ npm install tableexport
* [jQuery](https://jquery.com) (1.2.1 or higher) `*`
* [FileSaver.js](https://github.com/clarketm/FileSaver.js/)

> `*` jQuery dependency requirement is removed as of [4.0.0-alpha.2](https://github.com/clarketm/TableExport/tree/v4.0.0-alpha.2)
> `*` jQuery dependency requirement is removed as of [4.0.0-alpha.3](https://github.com/clarketm/TableExport/tree/v4.0.0-alpha.3)
#### Optional / Theming:

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tableexport.js",
"version": "4.0.0-alpha.2",
"version": "4.0.0-alpha.3",
"authors": [
"clarketm <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js 4.0.0-alpha.2 (https://www.travismclarke.com)
* TableExport.js 4.0.0-alpha.3 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions dist/js/tableexport.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js 4.0.0-alpha.2 (https://www.travismclarke.com)
* TableExport.js 4.0.0-alpha.3 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/
Expand Down Expand Up @@ -86,8 +86,14 @@
rcMap[ir + i][ic] = 1
}
}
if (rcMap[ir] && rcMap[ir][ic]) {
return new Array(rcMap[ir][ic]).concat(val.textContent);
if (rcMap[ir]) {
var total = 0,
min = Math.min.apply(Math, Object.keys(rcMap[ir])),
max = Math.max.apply(Math, Object.keys(rcMap[ir]));
while (min < max && rcMap[ir][min]) {
total += rcMap[ir][min] && delete rcMap[ir][min++];
}
return new Array(total).concat(val.textContent);
}
return val.textContent;
});
Expand Down Expand Up @@ -127,8 +133,14 @@
rcMap[ir + i][ic] = 1
}
}
if (rcMap[ir] && rcMap[ir][ic]) {
return new Array(rcMap[ir][ic]).concat(val.textContent);
if (rcMap[ir]) {
var total = 0,
min = Math.min.apply(Math, Object.keys(rcMap[ir])),
max = Math.max.apply(Math, Object.keys(rcMap[ir]));
while (min < max && rcMap[ir][min]) {
total += rcMap[ir][min] && delete rcMap[ir][min++];
}
return new Array(total).concat(val.textContent);
}
return val.textContent;
});
Expand Down Expand Up @@ -277,7 +289,7 @@
* Version.
* @memberof TableExport.prototype
*/
version: "4.0.0-alpha.2",
version: "4.0.0-alpha.3",
/**
* Default plugin options.
* @memberof TableExport.prototype
Expand Down
4 changes: 2 additions & 2 deletions dist/js/tableexport.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tableexport",
"version": "4.0.0-alpha.2",
"version": "4.0.0-alpha.3",
"authors": [
"clarketm <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion src/stable/css/tableexport.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js 4.0.0-alpha.2 (https://www.travismclarke.com)
* TableExport.js 4.0.0-alpha.3 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/
Expand Down
2 changes: 1 addition & 1 deletion src/stable/css/tableexport.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions src/stable/js/tableexport.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js 4.0.0-alpha.2 (https://www.travismclarke.com)
* TableExport.js 4.0.0-alpha.3 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/
Expand Down Expand Up @@ -86,8 +86,14 @@
rcMap[ir + i][ic] = 1
}
}
if (rcMap[ir] && rcMap[ir][ic]) {
return new Array(rcMap[ir][ic]).concat(val.textContent);
if (rcMap[ir]) {
var total = 0,
min = Math.min.apply(Math, Object.keys(rcMap[ir])),
max = Math.max.apply(Math, Object.keys(rcMap[ir]));
while (min < max && rcMap[ir][min]) {
total += rcMap[ir][min] && delete rcMap[ir][min++];
}
return new Array(total).concat(val.textContent);
}
return val.textContent;
});
Expand Down Expand Up @@ -127,8 +133,14 @@
rcMap[ir + i][ic] = 1
}
}
if (rcMap[ir] && rcMap[ir][ic]) {
return new Array(rcMap[ir][ic]).concat(val.textContent);
if (rcMap[ir]) {
var total = 0,
min = Math.min.apply(Math, Object.keys(rcMap[ir])),
max = Math.max.apply(Math, Object.keys(rcMap[ir]));
while (min < max && rcMap[ir][min]) {
total += rcMap[ir][min] && delete rcMap[ir][min++];
}
return new Array(total).concat(val.textContent);
}
return val.textContent;
});
Expand Down Expand Up @@ -277,7 +289,7 @@
* Version.
* @memberof TableExport.prototype
*/
version: "4.0.0-alpha.2",
version: "4.0.0-alpha.3",
/**
* Default plugin options.
* @memberof TableExport.prototype
Expand Down
4 changes: 2 additions & 2 deletions src/stable/js/tableexport.min.js

Large diffs are not rendered by default.

0 comments on commit e6f8b84

Please sign in to comment.