Skip to content

Commit 3167699

Browse files
fixed height / last cell width to prevent bad horizontal scroll effect
1 parent ad88fc3 commit 3167699

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

source/css/LightPivot.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
box-sizing: border-box;
182182
bottom: 0;
183183
width: 100%;
184-
height: 19px;
184+
height: 20px;
185185
font-size: 14px;
186186
border: 1px solid rgb(208, 208, 208);
187187
background: #F0F0F0;

source/js/PivotView.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ PivotView.prototype.pushTable = function (opts) {
145145

146146
this.elements.base.appendChild(tableElement);
147147
this.elements.tableContainer = tableElement;
148-
console.log("pagination changed to ", pg);
149148
this.pagination = pg;
150149

151150
setTimeout(function () {
@@ -438,7 +437,7 @@ PivotView.prototype.recalculateSizes = function (container) {
438437
headerH = topHeader.offsetHeight,
439438
containerHeight = container.offsetHeight,
440439
mainHeaderWidth = headerContainer.offsetWidth,
441-
hasVerticalScrollBar = tableBlock.scrollHeight > containerHeight - headerH - pagedHeight,
440+
hasVerticalScrollBar = lTableHead.offsetHeight > containerHeight - headerH - pagedHeight,
442441
addExtraLeftHeaderCell = lTableHead.offsetHeight > containerHeight - headerH - pagedHeight
443442
&& this.SCROLLBAR_WIDTH > 0,
444443
cell, tr, cellWidths = [], columnHeights = [], i;
@@ -752,7 +751,7 @@ PivotView.prototype.renderRawData = function (data) {
752751

753752
leftHeader.className = "lpt-leftHeader";
754753
topHeader.className = "lpt-topHeader";
755-
if (this.controller.CONFIG.enableHeadersScrolling) {
754+
if (this.controller.CONFIG["enableHeadersScrolling"]) {
756755
leftHeader.className = leftHeader.className + " lpt-scrollable-y";
757756
topHeader.className = topHeader.className + " lpt-scrollable-x";
758757
leftHeader.addEventListener("scroll", function () {

0 commit comments

Comments
 (0)