Skip to content

Commit

Permalink
Fix to picking up header styles
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Nov 23, 2017
1 parent 688d4c9 commit 3c265e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "LightPivotTable",
"author": "ZitRo",
"version": "1.8.10",
"version": "1.8.11",
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
"main": "test/testServer.js",
"repository": {
Expand Down
22 changes: 12 additions & 10 deletions source/js/DataController.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,21 +538,23 @@ DataController.prototype.resetRawData = function () {
for (y = 0; y < rawData.length; y++) {
for (x = 0; x < xEnd; x++) {
if (!rawData[y][x].isCaption) {
xEnd = x; break;
xEnd = x;
break;
}
if (rawData[y][x].source && rawData[y][x].source["path"]) {
for (i in formatColumn) {
var formatCR = data.info.topHeaderRowsNumber > y ? formatColumn : formatRow;
for (i in formatCR) {
if (rawData[y][x].source["path"].indexOf(i) >= 0) {
var yy;
for (yy = y; yy < rawData.length; yy++) {
if (!rawData[yy][x].isCaption) {
if (formatColumn[i].style) rawData[yy][x].style = (rawData[yy][x].style || "")
+ formatColumn[i].style || "";
// var yy;
// for (yy = y; yy < rawData.length; yy++) {
if (!rawData[y][x].isCaption) {
if (formatCR[i].style) rawData[y][x].style = (rawData[y][x].style || "")
+ formatCR[i].style || "";
} else {
if (formatColumn[i].headStyle) rawData[yy][x].style = (rawData[yy][x].style || "")
+ formatColumn[i].headStyle || "";
if (formatCR[i].headStyle) rawData[y][x].style = (rawData[y][x].style || "")
+ formatCR[i].headStyle || "";
}
}
// }
break;
}
}
Expand Down

0 comments on commit 3c265e7

Please sign in to comment.