mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed repeated relationships in networkmap
This commit is contained in:
parent
30889074af
commit
708cd1020b
@ -111,15 +111,22 @@ function set_center(id) {
|
|||||||
|
|
||||||
function get_relations(node_param) {
|
function get_relations(node_param) {
|
||||||
var return_links = [];
|
var return_links = [];
|
||||||
|
var links_id_db = [];
|
||||||
|
|
||||||
jQuery.each(graph.links, function (i, link_each) {
|
jQuery.each(graph.links, function (i, link_each) {
|
||||||
if (node_param.id == link_each.source.id) {
|
if (node_param.id == link_each.source.id || node_param.id == link_each.target.id) {vo
|
||||||
return_links.push(link_each);
|
if(links_id_db.length > 0){
|
||||||
}
|
if(links_id_db.indexOf(link_each.id_db) == -1){
|
||||||
else if (node_param.id == link_each.target.id) {
|
return_links.push(link_each);
|
||||||
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;
|
return return_links;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user