Added the filter as global js var, I am sorry.

This commit is contained in:
mdtrooper 2016-04-13 12:28:41 +02:00
parent b9e598f883
commit 83ff20b809
1 changed files with 1 additions and 7 deletions

View File

@ -105,14 +105,8 @@ abstract class Map {
<?php
echo "var nodes = " . json_encode($this->nodes) . ";";
echo "var edges = " . json_encode($this->edges) . ";";
echo "var filter = " . json_encode($this->filter) . ";";
?>
var temp = [];
for (var i in nodes) { temp[parseInt(i)] = nodes[i];}
nodes = temp;
temp = [];
for (var i in edges) { temp[parseInt(i)] = edges[i];}
edges = temp;
</script>
<?php
}