diff options
Diffstat (limited to 'web/nms.gathering.org/switches-json.pl')
-rwxr-xr-x | web/nms.gathering.org/switches-json.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/nms.gathering.org/switches-json.pl b/web/nms.gathering.org/switches-json.pl index 1dccfe2..8d3d88a 100755 --- a/web/nms.gathering.org/switches-json.pl +++ b/web/nms.gathering.org/switches-json.pl @@ -14,12 +14,12 @@ $q->execute(); my %json = (); while (my $ref = $q->fetchrow_hashref()) { - $ref->{'placement'} =~ /\((\d+),(\d+)\),\((\d+),(\d+)\)/; + $ref->{'placement'} =~ /\((-?\d+),(-?\d+)\),\((-?\d+),(-?\d+)\)/; my ($x1, $y1, $x2, $y2) = ($1, $2, $3, $4); $json{$ref->{'switch'}} = { sysname => $ref->{'sysname'}, x => $x2, - y => $y1, + y => $y2, width => $x1 - $x2, height => $y1 - $y2 }; |