get rid of d3 v3/v4 and only have v3
This commit is contained in:
		| @@ -100,7 +100,7 @@ $.getJSON('[% uri_for('/ajax/data/device/netmap') %]?[% my_query %]', function(m | ||||
|       .showLinkDirection(false) | ||||
|       .colorScheme('color20') | ||||
|       .preventLabelOverlappingOnForceEnd( | ||||
|         (mapdata['v3']['newnodes'] && ('[% params.mapshow %]' == 'neighbors')) | ||||
|         (mapdata['newnodes'] && ('[% params.mapshow %]' == 'neighbors')) | ||||
|         ? true : false | ||||
|       ) | ||||
|       .nodeEventToStopPinMode('none') | ||||
| @@ -118,13 +118,13 @@ $.getJSON('[% uri_for('/ajax/data/device/netmap') %]?[% my_query %]', function(m | ||||
|       .gravity(0.3); | ||||
|  | ||||
|     graph['nd2'] = {}; | ||||
|     graph['nd2']['centernode'] = mapdata['v3']['centernode']; | ||||
|     graph['nd2']['centernode'] = mapdata['centernode']; | ||||
|     graph['nd2']['dragging'] = false; | ||||
|  | ||||
|     graph.inspect().main.force.on('end.setupfornetdisco', function() { | ||||
|       graph.inspect().main.nodes.each(function(n) { n.fixed = true }); | ||||
|  | ||||
|       if (mapdata['v3']['newnodes'] && ('[% params.mapshow %]' != 'neighbors')) { | ||||
|       if (mapdata['newnodes'] && ('[% params.mapshow %]' != 'neighbors')) { | ||||
|         $.post( | ||||
|           '[% uri_for('/ajax/data/device/netmappositions') %]' | ||||
|           ,$("#nd_vlan-entry, #nd_devgrp-select, input[name='mapshow']").serialize() | ||||
| @@ -206,14 +206,7 @@ $.getJSON('[% uri_for('/ajax/data/device/netmap') %]?[% my_query %]', function(m | ||||
|       .append("path") | ||||
|       .attr("id", "nd2_netmap-spinner"); | ||||
|  | ||||
|     var netmapdata = {'data': { | ||||
|       'nodes': mapdata['v4']['nodes'].map(function(node) { | ||||
|         var index = node['index']; | ||||
|         return mapdata['v3']['nodes'][index]; | ||||
|       }), | ||||
|       'links': mapdata['v3']['links'] | ||||
|     }}; | ||||
|     graph.start(netmapdata); | ||||
|     graph.start(mapdata); | ||||
|     d3.select("#nd2_netmap-spinner").call(spin); | ||||
|  | ||||
|     graph.inspect().main.links.each(function(l) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user