Browse Source

auto scroll graph to right on page load

Thomas Buck 4 years ago
parent
commit
3ead1c0712
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      index.html

+ 3
- 0
index.html View File

@@ -146,6 +146,7 @@
146 146
 
147 147
                     div_wrapper.appendChild(ctx);
148 148
                     div_wrapper2 = document.createElement('div');
149
+                    div_wrapper2.id = 'scroller';
149 150
                     div_wrapper2.setAttribute('style', 'overflow-x: auto; overflow-y: auto;');
150 151
                     div_wrapper2.appendChild(div_wrapper);
151 152
 
@@ -235,6 +236,8 @@
235 236
                 div.appendChild(form_new);
236 237
                 div.appendChild(document.createElement('hr'));
237 238
                 document.getElementById("content").appendChild(div);
239
+
240
+                document.getElementById("scroller").scrollLeft += width_px * 4;
238 241
             };
239 242
 
240 243
             var getJSON = function(url, callback) {

Loading…
Cancel
Save