Fixed the import networkmaps from open.

This commit is contained in:
mdtrooper 2016-04-12 12:18:25 +02:00
parent 18412b7727
commit 2f9fba600e
1 changed files with 8 additions and 5 deletions

View File

@ -213,11 +213,14 @@ class Networkmap extends Map {
$sep_x = $this->width / $max_x;
$sep_y = $this->height / $max_y;
foreach ($nodes as $i => $node) {
$nodes[$i]['x'] *= $sep_x;
$nodes[$i]['y'] *= $sep_y;
}
}
else {
$sep_x = $sep_y = 100;
}
foreach ($nodes as $i => $node) {
$nodes[$i]['x'] *= $sep_x;
$nodes[$i]['y'] *= $sep_y;
}
foreach ($edges as $i => $edge) {