diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-10-02 10:44:35 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-10-02 10:31:43 +0000 |
| commit | 03c38bd60e6d997b4c7cc3e0a8f83d1580011372 (patch) | |
| tree | 0288f202fdd2f4ff52213e756981216d2a37c88c /pkg/cover/templates | |
| parent | d3a32bfeb9127fc122a331e04bd5980858328a96 (diff) | |
pkg/cover: show content for 2 last clicked files
Diffstat (limited to 'pkg/cover/templates')
| -rw-r--r-- | pkg/cover/templates/heatmap.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/cover/templates/heatmap.html b/pkg/cover/templates/heatmap.html index 512b0c417..fd03eb6cd 100644 --- a/pkg/cover/templates/heatmap.html +++ b/pkg/cover/templates/heatmap.html @@ -23,7 +23,8 @@ } function reqListener() { - document.getElementById("file-content").innerHTML = this.responseText; + document.getElementById("file-content-prev").innerHTML = document.getElementById("file-content-curr").innerHTML; + document.getElementById("file-content-curr").innerHTML = this.responseText; } function onShowFileContent(url){ @@ -153,7 +154,9 @@ {{template "dir" .Root}} </ul> </div> - <div id="file-content" style="display:inline-block; vertical-align: top"> + <div id="file-content-curr" style="display:inline-block; vertical-align: top"> + </div> + <div id="file-content-prev" style="display:inline-block; vertical-align: top"> </div> {{ end }} |
