mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
New networkmaps in progress... (Added button to hide and show node labels)
This commit is contained in:
parent
9157c76ba0
commit
aa8c99c2d4
@ -1239,7 +1239,15 @@ function show_networkmap($id = 0, $user_readonly = false, $nodes_and_relations =
|
|||||||
</a>
|
</a>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
|
echo '<div id="hide_labels" style="position: absolute; right: 0px; top: 0px;">
|
||||||
|
<a title="' . __('Hide Labels') . '" href="javascript: hide_labels();">
|
||||||
|
<img id="image_hide_show_labels" src="images/delete.png" />
|
||||||
|
</a>
|
||||||
|
</div>';
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.node {
|
.node {
|
||||||
|
@ -872,6 +872,35 @@ function add_agent_node(agents) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hide_labels() {
|
||||||
|
if (show_labels) {
|
||||||
|
hide_labels_function();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
show_labels_function();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hide_labels_function() {
|
||||||
|
show_labels = false;
|
||||||
|
|
||||||
|
//Change the image arrow
|
||||||
|
$("#hide_labels > a").attr("title", "Show Labels");
|
||||||
|
$("#image_hide_show_labels").attr("src", "images/refresh.png");
|
||||||
|
|
||||||
|
d3.selectAll(".node_text").style("display", "none");
|
||||||
|
}
|
||||||
|
|
||||||
|
function show_labels_function() {
|
||||||
|
show_labels = true;
|
||||||
|
console.log("PINTA");
|
||||||
|
//Change the image arrow
|
||||||
|
$("#hide_labels > a").attr("title", "Hide Labels");
|
||||||
|
$("#image_hide_show_labels").attr("src", "images/delete.png");
|
||||||
|
|
||||||
|
d3.selectAll(".node_text").style("display", "");
|
||||||
|
}
|
||||||
|
|
||||||
function toggle_minimap() {
|
function toggle_minimap() {
|
||||||
if (show_minimap) {
|
if (show_minimap) {
|
||||||
function_close_minimap();
|
function_close_minimap();
|
||||||
@ -1919,6 +1948,7 @@ function init_graph(parameter_object) {
|
|||||||
window.minimap_w = 0;
|
window.minimap_w = 0;
|
||||||
window.minimap_h = 0;
|
window.minimap_h = 0;
|
||||||
window.show_minimap = false;
|
window.show_minimap = false;
|
||||||
|
window.show_labels = true;
|
||||||
window.context_minimap;
|
window.context_minimap;
|
||||||
|
|
||||||
window.holding_area_dimensions = [200, 200];
|
window.holding_area_dimensions = [200, 200];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user