Skip to content

Commit

Permalink
when calculating frozen column positions, store value as integer as w…
Browse files Browse the repository at this point in the history
…ell as pixel string
  • Loading branch information
olifolkerd committed May 8, 2022
1 parent 99755ec commit 96233ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/js/modules/FrozenColumns/FrozenColumns.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ class FrozenColumns extends Module{
this.table.columnManager.element.style.paddingRight = this.rightMargin;

this.leftColumns.forEach((column, i) => {
column.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + "px";
column.modules.frozen.marginValue = leftMargin + this.table.columnManager.scrollLeft;
column.modules.frozen.margin = column.modules.frozen.marginValue + "px";

if(column.visible){
leftMargin += column.getWidth();
Expand Down Expand Up @@ -217,7 +218,8 @@ class FrozenColumns extends Module{
rightMargin += column.getWidth();
}

column.modules.frozen.margin = (this.rightPadding - rightMargin) + "px";
column.modules.frozen.marginValue = this.rightPadding - rightMargin;
column.modules.frozen.margin = column.modules.frozen.marginValue + "px";

if(i == this.rightColumns.length - 1){
column.modules.frozen.edge = true;
Expand Down

0 comments on commit 96233ca

Please sign in to comment.