mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Merge branch '2134-Fallos-en-las-relaciones-de-nodos,-el-regreso-dev' into 'develop'
Fixed repeated relationships in networkmap See merge request artica/pandorafms!1451
This commit is contained in:
commit
50357c6b83
@ -111,15 +111,22 @@ function set_center(id) {
|
||||
|
||||
function get_relations(node_param) {
|
||||
var return_links = [];
|
||||
var links_id_db = [];
|
||||
|
||||
jQuery.each(graph.links, function (i, link_each) {
|
||||
if (node_param.id == link_each.source.id) {
|
||||
return_links.push(link_each);
|
||||
}
|
||||
else if (node_param.id == link_each.target.id) {
|
||||
return_links.push(link_each);
|
||||
if (node_param.id == link_each.source.id || node_param.id == link_each.target.id) {vo
|
||||
if(links_id_db.length > 0){
|
||||
if(links_id_db.indexOf(link_each.id_db) == -1){
|
||||
return_links.push(link_each);
|
||||
links_id_db.push(link_each.id_db);
|
||||
}
|
||||
} else {
|
||||
return_links.push(link_each);
|
||||
links_id_db.push(link_each.id_db);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return return_links;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user