From 6618fba54808fcd711a7f10ea7d4e4d0280178f2 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 24 Dec 2017 23:13:33 +0000 Subject: [PATCH] fix neighbors pinning --- lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm | 2 +- share/views/ajax/device/netmap.tt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm index 6ed45c0f..a6468a0a 100644 --- a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm +++ b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm @@ -161,7 +161,7 @@ ajax '/ajax/data/device/netmap' => require_login sub { LABEL => $name, }; - if (exists $pos_for->{$device->ip}) { + if ($mapshow ne 'neighbors' and exists $pos_for->{$device->ip}) { my $node = $v3data{nodes}->{ ($device->get_column('row_number') - 1) }; $node->{'fixed'} = 1; $node->{'x'} = $pos_for->{$device->ip}->{'x'}; diff --git a/share/views/ajax/device/netmap.tt b/share/views/ajax/device/netmap.tt index 3ca74055..88b4a328 100644 --- a/share/views/ajax/device/netmap.tt +++ b/share/views/ajax/device/netmap.tt @@ -51,8 +51,8 @@ $.getJSON('[% uri_for('/ajax/data/device/netmap') %]?[% my_query %]', function(m .width( parseInt(jQuery('#netmap_pane').parent().css('width')) ) .height( window.innerHeight - 100 ) .showSelfLinks(true) - .minNodeRadius(6) - .maxNodeRadius(20) + .minNodeRadius(4) + .maxNodeRadius(14) .minZoomFactor(0.1) .maxZoomFactor(10) .charge(-550)