Spaces:
Running
Running
Made left position of model_title aligned with left side of table
Browse files
app.py
CHANGED
|
@@ -407,7 +407,7 @@ tr.row_odd {
|
|
| 407 |
white-space: nowrap;
|
| 408 |
z-index: 10;
|
| 409 |
pointer-events: none;
|
| 410 |
-
left:
|
| 411 |
transform: translateY(150%);
|
| 412 |
}
|
| 413 |
|
|
@@ -420,6 +420,9 @@ function addTitleForEachRowOfLeaderboardTable(){
|
|
| 420 |
const tables = document.querySelectorAll('.leaderboard-table table, .leaderboard-table-model-details table');
|
| 421 |
|
| 422 |
tables.forEach(table => {
|
|
|
|
|
|
|
|
|
|
| 423 |
const rows = table.querySelectorAll('tr');
|
| 424 |
|
| 425 |
if (table.scrollLeft > 10) {
|
|
|
|
| 407 |
white-space: nowrap;
|
| 408 |
z-index: 10;
|
| 409 |
pointer-events: none;
|
| 410 |
+
left: var(--table-rect-left, 0px);
|
| 411 |
transform: translateY(150%);
|
| 412 |
}
|
| 413 |
|
|
|
|
| 420 |
const tables = document.querySelectorAll('.leaderboard-table table, .leaderboard-table-model-details table');
|
| 421 |
|
| 422 |
tables.forEach(table => {
|
| 423 |
+
const rect = table.getBoundingClientRect();
|
| 424 |
+
table.style.setProperty('--table-rect-left', `${rect.left}px`);
|
| 425 |
+
|
| 426 |
const rows = table.querySelectorAll('tr');
|
| 427 |
|
| 428 |
if (table.scrollLeft > 10) {
|