Demo for 1-pixel rounding problems

rel-1.0
Vitaliy Filippov 2016-08-13 23:13:37 +03:00
parent 6f9d8ebc9e
commit 0abc99b619
2 changed files with 7 additions and 1 deletions

View File

@ -87,7 +87,10 @@ TreeGrid.prototype.initStickyHeaders = function()
this.sticky = true;
this.stickyInit = this.header && this.header.length;
if (this.stickyInit)
{
makeStickyHeaders(this.table);
this.table.className += ' stickyheaders';
}
}
TreeGrid.prototype.setHeader = function(newHeader)
@ -110,6 +113,7 @@ TreeGrid.prototype.setHeader = function(newHeader)
if (!this.stickyInit)
{
makeStickyHeaders(this.table);
this.table.className += ' stickyheaders';
this.stickyInit = true;
}
else

View File

@ -11,7 +11,9 @@
table, tr, td, th { box-sizing: border-box; background: white; }
table { border-collapse: separate; border-spacing: 0px; }
th, td { border-width: 0 1px 1px 0 !important; }
.scroller { width: 500px; height: 400px; overflow: auto; }
table td:nth-child(1) { width: 25%; }
table.stickyheaders td:nth-child(2) { width: 25%; }
.scroller { width: 100%; height: 400px; overflow: auto; }
</style>
</head>
<body>