Commit e87b3838 authored by VANDAELE Julien's avatar VANDAELE Julien
Browse files

refactor generate function name

parent b1a9d059
......@@ -105,7 +105,7 @@ window.onload = function() {
var radius = Math.max(Math.floor(height/testbedheight),Math.floor(width/testbedwidth))*11;
function generate() {
function getMeasures() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
......@@ -147,10 +147,10 @@ window.onload = function() {
console.log('took ', (+new Date) - init, 'ms');
};
// initial generate
generate();
getMeasures();
// whenever a user clicks on the ContainerWrapper the data will be regenerated -> new max & min
$('heatmapContainerWrapper').onclick = function() { generate(); };
$('heatmapContainerWrapper').onclick = function() { getMeasures(); };
$("radiusSlider").onchange = function(){
value = document.getElementById("radiusSlider").value;
radius = Math.max(Math.floor(height/testbedheight),Math.floor(width/testbedwidth))*value;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment