Merge branch '664-665-visual_modifications_to_networkmaps_in_footer_and_interface_text' into 'develop'

Added a few modifications to move the footer when nodes table is too long and re…

See merge request !327
This commit is contained in:
vgilc 2017-03-30 16:26:42 +02:00
commit c65d7d27a3
2 changed files with 57 additions and 3 deletions

View File

@ -2310,6 +2310,7 @@ function init_drag_and_drop() {
graph.nodes[d.id].py = d.py + delta[1];
});
draw_elements_graph();
set_positions_graph();
d3.event.sourceEvent.stopPropagation();
@ -2979,8 +2980,27 @@ function draw_elements_graph() {
.attr("xml:space", "preserve")
.append("textPath")
.attr("xlink:href", function(d) {
return "#link_id_text_" + d.id_db + networkmap_id;
if (d.source.x < d.target.x) {
return "#link_id_text_" + d.id_db + networkmap_id;
}
else {
return "#link_reverse_id_" + d.id_db + networkmap_id;
}
})
.attr("startOffset", function(d) {
if (d.source.x < d.target.x) {
return "";
}
else {
return "85%";
}})
.attr("text-anchor", function(d) {
if (d.source.x < d.target.x) {
return "";
}
else {
return "end";
}})
.append("tspan")
.attr("style", "font-size: 12px; " +
"font-style:normal; " +
@ -3005,8 +3025,27 @@ function draw_elements_graph() {
.attr("xml:space", "preserve")
.append("textPath")
.attr("xlink:href", function(d) {
return "#link_reverse_id_" + d.id_db + networkmap_id;
if (d.source.x < d.target.x) {
return "#link_id_text_" + d.id_db + networkmap_id;
}
else {
return "#link_reverse_id_" + d.id_db + networkmap_id;
}
})
.attr("startOffset", function(d) {
if (d.source.x < d.target.x) {
return "85%";
}
else {
return "";
}})
.attr("text-anchor", function(d) {
if (d.source.x < d.target.x) {
return "end";
}
else {
return "";
}})
.append("tspan")
.attr("style", "font-size: 12px; " +
"font-style:normal; " +
@ -3026,7 +3065,7 @@ function draw_elements_graph() {
return (Array(25).join(" ")) + text_link;
});
node = node.data(force.nodes(), function(d) { return d.id;});
node_temp = node.enter()

View File

@ -759,3 +759,18 @@ else {
show_networkmap($id, $user_readonly, $nodes_and_relations, $dash_mode, $map_dash_details);
}
?>
<script>
$(document).ready(function() {
$("*").on("click", function(){
if($("[aria-describedby=dialog_node_edit]").css('display') == 'block'){
$('#foot').css({'top':$("[aria-describedby=dialog_node_edit]").height()-150,'position':'relative'});
}
else{
$('#foot').css({'position':'','top':'0'});
}
});
});
</script>