Skip to content

Commit 3c265e7

Browse files
Fix to picking up header styles
1 parent 688d4c9 commit 3c265e7

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "LightPivotTable",
33
"author": "ZitRo",
4-
"version": "1.8.10",
4+
"version": "1.8.11",
55
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
66
"main": "test/testServer.js",
77
"repository": {

source/js/DataController.js

+12-10
Original file line numberDiff line numberDiff line change
@@ -538,21 +538,23 @@ DataController.prototype.resetRawData = function () {
538538
for (y = 0; y < rawData.length; y++) {
539539
for (x = 0; x < xEnd; x++) {
540540
if (!rawData[y][x].isCaption) {
541-
xEnd = x; break;
541+
xEnd = x;
542+
break;
542543
}
543544
if (rawData[y][x].source && rawData[y][x].source["path"]) {
544-
for (i in formatColumn) {
545+
var formatCR = data.info.topHeaderRowsNumber > y ? formatColumn : formatRow;
546+
for (i in formatCR) {
545547
if (rawData[y][x].source["path"].indexOf(i) >= 0) {
546-
var yy;
547-
for (yy = y; yy < rawData.length; yy++) {
548-
if (!rawData[yy][x].isCaption) {
549-
if (formatColumn[i].style) rawData[yy][x].style = (rawData[yy][x].style || "")
550-
+ formatColumn[i].style || "";
548+
// var yy;
549+
// for (yy = y; yy < rawData.length; yy++) {
550+
if (!rawData[y][x].isCaption) {
551+
if (formatCR[i].style) rawData[y][x].style = (rawData[y][x].style || "")
552+
+ formatCR[i].style || "";
551553
} else {
552-
if (formatColumn[i].headStyle) rawData[yy][x].style = (rawData[yy][x].style || "")
553-
+ formatColumn[i].headStyle || "";
554+
if (formatCR[i].headStyle) rawData[y][x].style = (rawData[y][x].style || "")
555+
+ formatCR[i].headStyle || "";
554556
}
555-
}
557+
// }
556558
break;
557559
}
558560
}

0 commit comments

Comments
 (0)