Skip to content
Snippets Groups Projects
Commit 659bc603 authored by Alexander Plavin's avatar Alexander Plavin
Browse files

hgweb: add reset javascript function to Graph

It makes the Graph object to be in the same state as just after
the initialization. This will help to add infinite scrolling to graph view.
parent fb6e87d9
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,14 @@
this.columns = 0;
this.revlink = '';
this.reset = function() {
this.bg = [0, 4];
this.cell = [2, 0];
this.columns = 0;
document.getElementById('nodebgs').innerHTML = '';
document.getElementById('graphnodes').innerHTML = '';
}
this.scale = function(height) {
this.bg_height = height;
this.box_size = Math.floor(this.bg_height / 1.2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment