Merge branch 'ent-2583-open-networkmaps-zoom-and-lines' into 'develop'

Correcciones en los mapas de red

See merge request artica/pandorafms!2044

Former-commit-id: 75d6fd9576486344e30a7168068014cd739eb26c
This commit is contained in:
vgilc 2018-12-05 08:34:33 +01:00
commit ceeb90b3ac
2 changed files with 6 additions and 3 deletions

View File

@ -175,6 +175,7 @@ function networkmap_process_networkmap($id = 0) {
$nodes_and_relations['nodes'] = array();
$index = 0;
foreach ($nodes as $key => $node) {
$nodes_and_relations['nodes'][$index]['id'] = $node["id"];
$nodes_and_relations['nodes'][$index]['id_map'] = $id;
$nodes_and_relations['nodes'][$index]['x'] = (int)$node['coords'][0];
@ -303,6 +304,7 @@ function networkmap_process_networkmap($id = 0) {
$index = 0;
$node_center = array();
foreach ($nodes as $key => $node) {
$nodes_and_relations['nodes'][$index]['id'] = $node["id"];
$nodes_and_relations['nodes'][$index]['id_map'] = $id;
$children_count = 0;
@ -1072,6 +1074,7 @@ function networkmap_loadfile($id = 0, $file = '',
$node_id = $items[1];
$node_x = $items[2] * 100; //200 is for show more big
$node_y = $height_map - $items[3] * 100; //200 is for show more big
$data['id'] = $node_id;
$data['text'] = '';
$data['image'] = '';
$data['width'] = 10;

View File

@ -2721,7 +2721,7 @@ function init_graph(parameter_object) {
}
window.scale_minimap = 4.2;
window.translation = [0, 0];
window.scale = (typeof (z_dash) != "undefined") ? z_dash : 0.5;
window.scale = z_dash || 0.5;
window.node_radius = 40;
if (typeof (parameter_object.node_radius) != "undefined") {
window.node_radius = parameter_object.node_radius;
@ -3306,7 +3306,7 @@ function draw_elements_graph() {
})
.attr("startOffset", function (d) {
if (d.source.x < d.target.x) {
return "";
return "0%";
}
else {
return "85%";
@ -3356,7 +3356,7 @@ function draw_elements_graph() {
return "85%";
}
else {
return "";
return "0%";
}
})
.attr("text-anchor", function (d) {