Commit 9830f206 authored by VANDAELE Julien's avatar VANDAELE Julien
Browse files

refactor the getMeasures() function name to updateMeasures()

since this function get the measures from the REST api, then update the map
parent 55e99e73
......@@ -106,7 +106,7 @@ window.onload = function() {
var radius = Math.max(Math.floor(height/testbedheight),Math.floor(width/testbedwidth))*11;
function getMeasures() {
function updateMeasures() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
......@@ -148,11 +148,11 @@ window.onload = function() {
console.log('took ', (+new Date) - init, 'ms');
};
// initial generate
getMeasures();
updateMeasures();
// whenever a user clicks on the ContainerWrapper the data will be regenerated -> new max & min
$('refreshButton').onclick = function() { getMeasures(); };
$('teamSelector').onchange = function() { getMeasures(); };
$('refreshButton').onclick = function() { updateMeasures(); };
$('teamSelector').onchange = function() { updateMeasures(); };
$("radiusSlider").onchange = function(){
value = $("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