Browse Source

auto scroll graph to right on page load

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

Loading…
Cancel
Save