mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
New networkmaps in progress... (Fixed some errors and added new images to map)
This commit is contained in:
parent
7dc8feb07c
commit
53b0934c3e
BIN
pandora_console/images/icono_delete_networkmaps.png
Normal file
BIN
pandora_console/images/icono_delete_networkmaps.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 869 B |
BIN
pandora_console/images/icono_refresh_networkmaps.png
Normal file
BIN
pandora_console/images/icono_refresh_networkmaps.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 999 B |
@ -1241,7 +1241,7 @@ function show_networkmap($id = 0, $user_readonly = false, $nodes_and_relations =
|
|||||||
|
|
||||||
echo '<div id="hide_labels" style="position: absolute; right: 10px; top: 10px;">
|
echo '<div id="hide_labels" style="position: absolute; right: 10px; top: 10px;">
|
||||||
<a title="' . __('Hide Labels') . '" href="javascript: hide_labels();">
|
<a title="' . __('Hide Labels') . '" href="javascript: hide_labels();">
|
||||||
<img id="image_hide_show_labels" src="images/delete.png" />
|
<img id="image_hide_show_labels" src="images/icono_delete_networkmaps.png" />
|
||||||
</a>
|
</a>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
|
@ -23,8 +23,14 @@ function draw_minimap() {
|
|||||||
|
|
||||||
context_minimap.beginPath();
|
context_minimap.beginPath();
|
||||||
//Paint the item
|
//Paint the item
|
||||||
|
if (graph.nodes.length > 100) {
|
||||||
center_orig_x = (value.x + value.image_width / 4) * relation_min_nodes + minimap_w / relation_minimap_w;
|
center_orig_x = (value.x + value.image_width / 4) * relation_min_nodes + minimap_w / relation_minimap_w;
|
||||||
center_orig_y = (value.y + value.image_height / 4) * relation_min_nodes + minimap_h / relation_minimap_h;
|
center_orig_y = (value.y + value.image_height / 4) * relation_min_nodes + minimap_h / relation_minimap_h;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
center_orig_x = (value.x + value.image_width / 2) * relation_min_nodes;
|
||||||
|
center_orig_y = (value.y + value.image_height / 2) * relation_min_nodes;
|
||||||
|
}
|
||||||
|
|
||||||
context_minimap.arc(center_orig_x,
|
context_minimap.arc(center_orig_x,
|
||||||
center_orig_y, 2, 0, Math.PI * 2, false);
|
center_orig_y, 2, 0, Math.PI * 2, false);
|
||||||
@ -38,6 +44,7 @@ function draw_minimap() {
|
|||||||
context_minimap.fill();
|
context_minimap.fill();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (graph.nodes.length > 100) {
|
||||||
//Draw the rect of viewport
|
//Draw the rect of viewport
|
||||||
context_minimap.beginPath();
|
context_minimap.beginPath();
|
||||||
context_minimap.strokeStyle = "#3f3f3f";
|
context_minimap.strokeStyle = "#3f3f3f";
|
||||||
@ -46,6 +53,17 @@ function draw_minimap() {
|
|||||||
(-translation[1] / scale) * relation_min_nodes + minimap_h / relation_minimap_h,
|
(-translation[1] / scale) * relation_min_nodes + minimap_h / relation_minimap_h,
|
||||||
width_svg * relation_min_nodes / scale,
|
width_svg * relation_min_nodes / scale,
|
||||||
height_svg * relation_min_nodes / scale);
|
height_svg * relation_min_nodes / scale);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//Draw the rect of viewport
|
||||||
|
context_minimap.beginPath();
|
||||||
|
context_minimap.strokeStyle = "#f00";
|
||||||
|
context_minimap.strokeRect(
|
||||||
|
(-translation[0] / scale) * relation_min_nodes,
|
||||||
|
(-translation[1] / scale) * relation_min_nodes,
|
||||||
|
width_svg * relation_min_nodes / scale,
|
||||||
|
height_svg * relation_min_nodes / scale);
|
||||||
|
}
|
||||||
|
|
||||||
context_minimap.beginPath();
|
context_minimap.beginPath();
|
||||||
context_minimap.strokeStyle = "#82B92E";
|
context_minimap.strokeStyle = "#82B92E";
|
||||||
@ -895,7 +913,7 @@ function hide_labels_function() {
|
|||||||
|
|
||||||
//Change the image arrow
|
//Change the image arrow
|
||||||
$("#hide_labels > a").attr("title", "Show Labels");
|
$("#hide_labels > a").attr("title", "Show Labels");
|
||||||
$("#image_hide_show_labels").attr("src", "images/refresh.png");
|
$("#image_hide_show_labels").attr("src", "images/icono_refresh_networkmaps.png");
|
||||||
|
|
||||||
d3.selectAll(".node_text").style("display", "none");
|
d3.selectAll(".node_text").style("display", "none");
|
||||||
}
|
}
|
||||||
@ -905,7 +923,7 @@ function show_labels_function() {
|
|||||||
console.log("PINTA");
|
console.log("PINTA");
|
||||||
//Change the image arrow
|
//Change the image arrow
|
||||||
$("#hide_labels > a").attr("title", "Hide Labels");
|
$("#hide_labels > a").attr("title", "Hide Labels");
|
||||||
$("#image_hide_show_labels").attr("src", "images/delete.png");
|
$("#image_hide_show_labels").attr("src", "images/icono_delete_networkmaps.png");
|
||||||
|
|
||||||
d3.selectAll(".node_text").style("display", "");
|
d3.selectAll(".node_text").style("display", "");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user