show ips functionality; improvement to maximise icon; bugfix d3-force label wrap
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
$("[rel=tooltip]").tooltip({live: true});
|
||||
$("[rel=popover]").popover({live: true});
|
||||
|
||||
// positions save not available in netmap neighbors view
|
||||
if ($("input[name='mapshow']:checked").val() == 'neighbors') {
|
||||
$('#nd_netmap-save').prop('disabled', true).removeClass('btn-info');
|
||||
} else {
|
||||
@@ -106,6 +107,27 @@
|
||||
$("[rel=tooltip]").tooltip({live: true});
|
||||
});
|
||||
|
||||
// netmap show controls
|
||||
$('#nd_showips').change(function() {
|
||||
if ($(this).prop('checked')) {
|
||||
graph.inspect().main.nodes.each(function(n) {
|
||||
if (n['ORIG_LABEL'] != n['ID']) {
|
||||
n['LABEL'] = n['ORIG_LABEL'] + ' ' + n['ID'];
|
||||
}
|
||||
});
|
||||
graph.wrapLabels(true).preventLabelOverlappingOnForceEnd(true).start();
|
||||
} else {
|
||||
graph.inspect().main.nodes.each(function(n) {
|
||||
n['LABEL'] = n['ORIG_LABEL'];
|
||||
});
|
||||
graph.preventLabelOverlappingOnForceEnd(
|
||||
($("input[name='mapshow']:checked").val() == 'neighbors')
|
||||
? true : false
|
||||
);
|
||||
graph.wrapLabels(false).start();
|
||||
}
|
||||
});
|
||||
|
||||
// netmap pin/release controls
|
||||
$('#nd_netmap-releaseall').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user