Skip to content

Commit

Permalink
resolved #9399 in network visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
sennierer committed Sep 7, 2017
1 parent 580abfb commit 9c5502c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions entities/templates/entities/generic_network_visualization.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,15 @@
download_network_data(form2);
$.ApisNet.nodes_expand = new Array();
};

function expand_node(node_type, node_id){
if (typeof $.ApisNet.nodes_expand == 'undefined') {
$.ApisNet.nodes_expand = new Array();
};
$.ApisNet.nodes_expand.push([node_type, node_id]);
$.ApisNet.tooltip.close();
expand_nodes();
};
function add_file_list(data, s, xhr) {
var file_name = data['file_name'].split('/')[2]
if ($('#list_created_graphs').length) {
Expand Down Expand Up @@ -420,7 +429,9 @@
$.ApisNet.instance.settings({
minNodeSize: 5,
maxNodeSize: 15,
animationsTime: 4500
animationsTime: 4500,
skip_existing_nodes: true,
skip_existing_edges: true
})
sigma.layouts.configForceLink($.ApisNet.instance, {
worker: true,
Expand All @@ -434,6 +445,7 @@
show: 'clickNode',
cssClass: 'sigma-tooltip',
position: 'top',
hide: 'outNode',
renderer: function(node) {
// The function context is s.graph
// Returns an HTML string:
Expand All @@ -445,7 +457,7 @@
}],
};
// Instanciate the tooltips plugin with a Mustache renderer for node tooltips:
var tooltips = sigma.plugins.tooltips($.ApisNet.instance, $.ApisNet.instance.renderers[0], config);
$.ApisNet.tooltip = sigma.plugins.tooltips($.ApisNet.instance, $.ApisNet.instance.renderers[0], config);
//$.ApisNet.instance.bind("rightClickNode", delete_nodes);
$.ApisNet.instance.bind("rightClickNode", select_unselect_node);

Expand Down

0 comments on commit 9c5502c

Please sign in to comment.