Skip to content

Commit

Permalink
Scroll to the correct position when clicking on a selected contestant
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Sep 17, 2022
1 parent 918cdd9 commit c1e8f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmsranking/Scoreboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ var Scoreboard = new function () {
self.scroll_into_view = function (u_id) {
var $row = $("tr.user[data-user=" + u_id + "]", self.tbody_el);
var $frame = $("#InnerFrame");
var scroll = $row.position().top + $frame.scrollTop() + $row.height() / 2 - $frame.height() / 2;
var scroll = $row.position().top + $row.height() / 2 - $frame.height() / 2;
$frame.scrollTop(scroll);
};
};

0 comments on commit c1e8f7c

Please sign in to comment.