summaryrefslogtreecommitdiff
path: root/doc/sample_html/coverage_html.js
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-02 22:07:48 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-02 22:07:48 -0400
commit9515c4da0749bcc8003f28a3759a418a0194db4b (patch)
tree2ad27a8c355a82addd26f93b1d63581a24c9bc9f /doc/sample_html/coverage_html.js
parente179cf6d4abffe56ef04b07202865363f53bb814 (diff)
downloadpython-coveragepy-git-9515c4da0749bcc8003f28a3759a418a0194db4b.tar.gz
docs: 6.0 sample HTML report6.0
Diffstat (limited to 'doc/sample_html/coverage_html.js')
-rw-r--r--doc/sample_html/coverage_html.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/doc/sample_html/coverage_html.js b/doc/sample_html/coverage_html.js
index 27b49b36..30d3a067 100644
--- a/doc/sample_html/coverage_html.js
+++ b/doc/sample_html/coverage_html.js
@@ -29,8 +29,8 @@ coverage.wire_up_help_panel = function () {
var koff = $("#keyboard_icon").offset();
var poff = $("#panel_icon").position();
$(".help_panel").offset({
- top: koff.top-poff.top,
- left: koff.left-poff.left
+ top: koff.top-poff.top-1,
+ left: koff.left-poff.left-1
});
});
$("#panel_icon").click(function () {
@@ -311,11 +311,6 @@ coverage.line_elt = function (n) {
return $("#t" + n);
};
-// Return the nth line number div.
-coverage.num_elt = function (n) {
- return $("#n" + n);
-};
-
// Set the selection. b and e are line numbers.
coverage.set_sel = function (b, e) {
// The first line selected.
@@ -514,9 +509,9 @@ coverage.show_selection = function () {
var c = coverage;
// Highlight the lines in the chunk
- $(".linenos .highlight").removeClass("highlight");
+ $("#source .highlight").removeClass("highlight");
for (var probe = c.sel_begin; probe > 0 && probe < c.sel_end; probe++) {
- c.num_elt(probe).addClass("highlight");
+ c.line_elt(probe).addClass("highlight");
}
c.scroll_to_selection();