Skip to content

Commit

Permalink
Undo last change
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Nov 23, 2017
1 parent d67db5a commit 688d4c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 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.9",
"version": "1.8.10",
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
"main": "test/testServer.js",
"repository": {
Expand Down
25 changes: 7 additions & 18 deletions source/js/DataController.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,22 +434,13 @@ DataController.prototype.resetRawData = function () {

};

var applyHeaderStyle = function (cellObject, isHorizontal, previousHeaders) {
var applyHeaderStyle = function (cellObject, isHorizontal) {
if (!_.controller.CONFIG["pivotProperties"]) return;
if (_.controller.CONFIG["pivotProperties"]["columnHeaderStyle"] && isHorizontal) {
cellObject.style =
_.controller.CONFIG["pivotProperties"]["columnHeaderStyle"] + cellObject.style;
cellObject.style = _.controller.CONFIG["pivotProperties"]["columnHeaderStyle"];
} else if (_.controller.CONFIG["pivotProperties"]["rowHeaderStyle"] && !isHorizontal) {
cellObject.style =
_.controller.CONFIG["pivotProperties"]["rowHeaderStyle"] + cellObject.style;
cellObject.style = _.controller.CONFIG["pivotProperties"]["rowHeaderStyle"];
}
if (typeof previousHeaders === "undefined")
return;
var prevStyles = previousHeaders.reduce(
function (acc, h) { return acc + (h.style || "") }, ""
);
if (prevStyles)
cellObject.style += prevStyles;
};

var getMaxLevel = function (children, level) {
Expand Down Expand Up @@ -498,20 +489,18 @@ DataController.prototype.resetRawData = function () {
group: cnum,
source: c[i],
isCaption: true,
value: c[i].caption || "",
style: c[i].style || ""
value: c[i].caption || ""
};
applyHeaderStyle(obj, hor, arr);
applyHeaderStyle(obj, hor);
dim1raw(a, c[i].children, arr.concat(obj), hor, level? level + 1 : level, maxLevel);
} else {
obj = {
group: groupNum,
source: c[i],
isCaption: true,
value: c[i].caption || "",
style: c[i].style || ""
value: c[i].caption || ""
};
applyHeaderStyle(obj, hor, arr);
applyHeaderStyle(obj, hor);
a.push(c[i]["type"] === "msr" && MEASURES_HIDDEN ? arr : arr.concat(obj));
groupNum++;
}
Expand Down

0 comments on commit 688d4c9

Please sign in to comment.