Skip to content

Commit 1cb5638

Browse files
drillThrough, CSS fixes
1 parent 4f2c66d commit 1cb5638

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

source/css/LightPivot.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,11 @@
239239
box-sizing: border-box;
240240
}
241241

242+
.lpt td {
243+
text-overflow: ellipsis;
244+
overflow: hidden;
245+
}
246+
242247
.lpt .lpt-topSection, .lpt .lpt-bottomSection {
243248
position: relative;
244249
overflow: hidden;
@@ -313,6 +318,7 @@
313318
}
314319

315320
.lpt .lpt-topHeader th {
321+
min-width: 100px;
316322
/*border-bottom: none;*/
317323
}
318324

source/js/PivotView.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ PivotView.prototype.renderRawData = function (data) {
587587
console.log("Data to render: ", data);
588588

589589
// fill header
590-
header.textContent = rawData[0][0].value;
590+
header.textContent = info.leftHeaderColumnsNumber ? rawData[0][0].value : "";
591591
if (this.tablesStack.length > 1 && !this.controller.CONFIG["hideButtons"]) {
592592
header.className += "back ";
593593
header.addEventListener(CLICK_EVENT, function (e) {
@@ -617,9 +617,18 @@ PivotView.prototype.renderRawData = function (data) {
617617
for (y = info.topHeaderRowsNumber; y < rawData.length; y++) {
618618
tr = document.createElement("tr");
619619
for (x = info.leftHeaderColumnsNumber; x < rawData[0].length; x++) {
620+
620621
tr.appendChild(td = document.createElement("td"));
621622
td.textContent = rawData[y][x].value || "";
622623
if (rawData[y][x].style) td.setAttribute("style", rawData[y][x].style);
624+
625+
// add handlers
626+
td.addEventListener("click", (function (x, y) {
627+
return function (event) {
628+
_._cellClickHandler.call(_, x, y, event);
629+
};
630+
})(x, y));
631+
623632
}
624633
mainTBody.appendChild(tr);
625634
}

0 commit comments

Comments
 (0)