Spaces:
Running
Running
Made top position of model_title aligned with bottom side of row
Browse files
app.py
CHANGED
@@ -408,7 +408,8 @@ tr.row_odd {
|
|
408 |
z-index: 10;
|
409 |
pointer-events: none;
|
410 |
left: var(--table-rect-left, 0px);
|
411 |
-
|
|
|
412 |
}
|
413 |
|
414 |
"""
|
@@ -436,6 +437,10 @@ function addTitleForEachRowOfLeaderboardTable(){
|
|
436 |
|
437 |
// Set the model_title attribute for the row
|
438 |
row.setAttribute('model_title', titleText);
|
|
|
|
|
|
|
|
|
439 |
}
|
440 |
});
|
441 |
} else {
|
|
|
408 |
z-index: 10;
|
409 |
pointer-events: none;
|
410 |
left: var(--table-rect-left, 0px);
|
411 |
+
top: var(--row-rect-bottom, 0px);
|
412 |
+
transform: translateY(0px);
|
413 |
}
|
414 |
|
415 |
"""
|
|
|
437 |
|
438 |
// Set the model_title attribute for the row
|
439 |
row.setAttribute('model_title', titleText);
|
440 |
+
|
441 |
+
// Set bottom position
|
442 |
+
const rect = row.getBoundingClientRect();
|
443 |
+
row.style.setProperty('--row-rect-bottom', `${rect.bottom}px`);
|
444 |
}
|
445 |
});
|
446 |
} else {
|