From 65d6d9d9d9581cef06ad2c4c88b293e0f0e0f68d Mon Sep 17 00:00:00 2001 From: ZitRos Date: Fri, 3 Mar 2017 18:50:23 +0200 Subject: [PATCH] Fixed first column width in listing --- package.json | 2 +- source/js/PivotView.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f85a20f..9ba9251 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "LightPivotTable", "author": "ZitRo", - "version": "1.8.0", + "version": "1.8.1", "description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache", "main": "test/testServer.js", "repository": { diff --git a/source/js/PivotView.js b/source/js/PivotView.js index 1a5848e..694e8e3 100644 --- a/source/js/PivotView.js +++ b/source/js/PivotView.js @@ -1340,17 +1340,16 @@ PivotView.prototype.renderRawData = function (data) { // top left header setup header.textContent = info.leftHeaderColumnsNumber ? rawData[0][0].value : ""; - if (rawData[0][0].style) header.setAttribute("style", rawData[0][0].style); + if (rawData[0][0].style && !LISTING) header.setAttribute("style", rawData[0][0].style); if (this.tablesStack.length > 1 && !this.controller.CONFIG["hideButtons"]) { header.className += "back "; header.addEventListener(CLICK_EVENT, function (e) { _._backClickHandler.call(_, e); }); } - if (info.leftHeaderColumnsNumber > 0 - && _.controller.CONFIG["maxHeaderWidth"]) { + if (info.leftHeaderColumnsNumber > 0 && _.controller.CONFIG["maxHeaderWidth"]) { pivotHeader.style.maxWidth = - _.controller.CONFIG["maxHeaderWidth"]*info.leftHeaderColumnsNumber + "px"; + _.controller.CONFIG["maxHeaderWidth"] * info.leftHeaderColumnsNumber + "px"; pivotHeader.style.whiteSpace = "normal"; pivotHeader.style.wordWrap = "normal"; }