From a4f2a65e3a9178e33a07684f41d8b607b72bbedd Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 3 Dec 2018 16:12:36 +0100 Subject: [PATCH 1/3] Fixed the initial zoom and center of the networkmaps --- .../include/javascript/functions_pandora_networkmap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/javascript/functions_pandora_networkmap.js b/pandora_console/include/javascript/functions_pandora_networkmap.js index 3a8f29d6c0..1cef4c4ca8 100644 --- a/pandora_console/include/javascript/functions_pandora_networkmap.js +++ b/pandora_console/include/javascript/functions_pandora_networkmap.js @@ -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; From f81cbed374428c94a994522a9e416c677d579b55 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Tue, 4 Dec 2018 16:22:35 +0100 Subject: [PATCH 2/3] Fixed an error which caused the networkmap elements to not have lines --- pandora_console/include/functions_pandora_networkmap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/include/functions_pandora_networkmap.php b/pandora_console/include/functions_pandora_networkmap.php index 22df6a582b..90d6ef3022 100644 --- a/pandora_console/include/functions_pandora_networkmap.php +++ b/pandora_console/include/functions_pandora_networkmap.php @@ -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; From 3c317c182d5988b6670a04b581cea3f4c67d4104 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Tue, 4 Dec 2018 16:42:19 +0100 Subject: [PATCH 3/3] Default value given to a textPath's startOffet attribute to fix an error --- .../include/javascript/functions_pandora_networkmap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/javascript/functions_pandora_networkmap.js b/pandora_console/include/javascript/functions_pandora_networkmap.js index 1cef4c4ca8..8871950f3e 100644 --- a/pandora_console/include/javascript/functions_pandora_networkmap.js +++ b/pandora_console/include/javascript/functions_pandora_networkmap.js @@ -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) {