Merge branch 'ent-10195-offset-de-mapas' into 'develop'
Ent 10195 offset de mapas See merge request artica/pandorafms!5539
This commit is contained in:
commit
e34677e5f6
|
@ -1196,6 +1196,10 @@ class NetworkMap
|
||||||
$head .= 'overlap="scalexy";';
|
$head .= 'overlap="scalexy";';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($layout == 'spring1' || $layout == 'spring2') {
|
||||||
|
$head .= 'sep="'.$node_sep.'";';
|
||||||
|
}
|
||||||
|
|
||||||
if ($layout == 'flat') {
|
if ($layout == 'flat') {
|
||||||
$head .= 'ranksep="'.$rank_sep.'";';
|
$head .= 'ranksep="'.$rank_sep.'";';
|
||||||
}
|
}
|
||||||
|
@ -3505,6 +3509,7 @@ class NetworkMap
|
||||||
url_background_grid: url_background_grid,
|
url_background_grid: url_background_grid,
|
||||||
refresh_time: '.$this->mapOptions['refresh_time'].',
|
refresh_time: '.$this->mapOptions['refresh_time'].',
|
||||||
font_size: '.$this->mapOptions['font_size'].',
|
font_size: '.$this->mapOptions['font_size'].',
|
||||||
|
method: '.$this->map['generation_method'].',
|
||||||
base_url_homedir: "'.ui_get_full_url(false).'"
|
base_url_homedir: "'.ui_get_full_url(false).'"
|
||||||
});
|
});
|
||||||
init_drag_and_drop();
|
init_drag_and_drop();
|
||||||
|
|
|
@ -1126,6 +1126,10 @@ function networkmap_open_graph(
|
||||||
$head .= 'overlap="scalexy";';
|
$head .= 'overlap="scalexy";';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($layout == 'spring1' || $layout == 'spring2') {
|
||||||
|
$head .= 'sep="'.$node_sep.'";';
|
||||||
|
}
|
||||||
|
|
||||||
if ($layout === 'flat') {
|
if ($layout === 'flat') {
|
||||||
$head .= 'ranksep="'.$rank_sep.'";';
|
$head .= 'ranksep="'.$rank_sep.'";';
|
||||||
} else if ($layout === 'spring2') {
|
} else if ($layout === 'spring2') {
|
||||||
|
|
|
@ -55,10 +55,30 @@ function draw_minimap() {
|
||||||
var relation_min_nodes = minimap_relation;
|
var relation_min_nodes = minimap_relation;
|
||||||
var relation_minimap_w = 2;
|
var relation_minimap_w = 2;
|
||||||
var relation_minimap_h = 2;
|
var relation_minimap_h = 2;
|
||||||
if (graph.nodes.length > 100) {
|
if (graph.nodes.length > 100 && graph.nodes.length < 500) {
|
||||||
relation_min_nodes = 0.01;
|
relation_min_nodes = 0.01;
|
||||||
relation_minimap_w = (graph.nodes.length / 100) * 2.5;
|
relation_minimap_w = (graph.nodes.length / 100) * 2.5;
|
||||||
relation_minimap_h = 1.5;
|
relation_minimap_h = 1.5;
|
||||||
|
} else if (graph.nodes.length >= 500 && graph.nodes.length < 1000) {
|
||||||
|
if (typeof method != "undefined" && method == 4) {
|
||||||
|
relation_min_nodes = 0.002;
|
||||||
|
relation_minimap_w = (graph.nodes.length / 500) * 2.5;
|
||||||
|
relation_minimap_h = 3;
|
||||||
|
} else {
|
||||||
|
relation_min_nodes = 0.008;
|
||||||
|
relation_minimap_w = (graph.nodes.length / 500) * 2.5;
|
||||||
|
relation_minimap_h = 3;
|
||||||
|
}
|
||||||
|
} else if (graph.nodes.length >= 1000) {
|
||||||
|
if (typeof method != "undefined" && method == 4) {
|
||||||
|
relation_min_nodes = 0.001;
|
||||||
|
relation_minimap_w = (graph.nodes.length / 1000) * 4.5;
|
||||||
|
relation_minimap_h = 4;
|
||||||
|
} else {
|
||||||
|
relation_min_nodes = 0.0015;
|
||||||
|
relation_minimap_w = (graph.nodes.length / 1000) * 3.5;
|
||||||
|
relation_minimap_h = 3.5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw the items and lines
|
//Draw the items and lines
|
||||||
|
@ -1792,10 +1812,30 @@ function init_minimap() {
|
||||||
var relation_minimap_w = 2;
|
var relation_minimap_w = 2;
|
||||||
var relation_minimap_h = 2;
|
var relation_minimap_h = 2;
|
||||||
|
|
||||||
if (graph.nodes.length > 100) {
|
if (graph.nodes.length > 100 && graph.nodes.length < 500) {
|
||||||
relation_min_nodes = 0.01;
|
relation_min_nodes = 0.01;
|
||||||
relation_minimap_w = (graph.nodes.length / 100) * 2.5;
|
relation_minimap_w = (graph.nodes.length / 100) * 2.5;
|
||||||
relation_minimap_h = 1.5;
|
relation_minimap_h = 1.5;
|
||||||
|
} else if (graph.nodes.length >= 500 && graph.nodes.length < 1000) {
|
||||||
|
if (typeof method != "undefined" && method == 4) {
|
||||||
|
relation_min_nodes = 0.002;
|
||||||
|
relation_minimap_w = (graph.nodes.length / 500) * 2.5;
|
||||||
|
relation_minimap_h = 3;
|
||||||
|
} else {
|
||||||
|
relation_min_nodes = 0.008;
|
||||||
|
relation_minimap_w = (graph.nodes.length / 500) * 2.5;
|
||||||
|
relation_minimap_h = 3;
|
||||||
|
}
|
||||||
|
} else if (graph.nodes.length >= 1000) {
|
||||||
|
if (typeof method != "undefined" && method == 4) {
|
||||||
|
relation_min_nodes = 0.001;
|
||||||
|
relation_minimap_w = (graph.nodes.length / 1000) * 4.5;
|
||||||
|
relation_minimap_h = 4;
|
||||||
|
} else {
|
||||||
|
relation_min_nodes = 0.0015;
|
||||||
|
relation_minimap_w = (graph.nodes.length / 1000) * 3.5;
|
||||||
|
relation_minimap_h = 3.5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#minimap_" + networkmap_id).bind("mousemove", function(event) {
|
$("#minimap_" + networkmap_id).bind("mousemove", function(event) {
|
||||||
|
@ -3092,6 +3132,10 @@ function init_graph(parameter_object) {
|
||||||
window.refresh_time = parameter_object.refresh_time;
|
window.refresh_time = parameter_object.refresh_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof parameter_object.method != "undefined") {
|
||||||
|
window.method = parameter_object.method;
|
||||||
|
}
|
||||||
|
|
||||||
var rect_center_x = graph.nodes[0].x;
|
var rect_center_x = graph.nodes[0].x;
|
||||||
var rect_center_y = graph.nodes[0].y;
|
var rect_center_y = graph.nodes[0].y;
|
||||||
|
|
||||||
|
|
|
@ -57,10 +57,10 @@ if ($new_networkmap) {
|
||||||
$offset_x = '';
|
$offset_x = '';
|
||||||
$offset_y = '';
|
$offset_y = '';
|
||||||
$scale_z = 0.5;
|
$scale_z = 0.5;
|
||||||
$node_sep = 10;
|
$node_sep = 0.25;
|
||||||
$rank_sep = 1.0;
|
$rank_sep = 0.5;
|
||||||
$mindist = 1.0;
|
$mindist = 1.0;
|
||||||
$kval = 5;
|
$kval = 0.3;
|
||||||
$refresh_time = 300;
|
$refresh_time = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -617,7 +617,7 @@ $(document).ready(function() {
|
||||||
$("#form_editor-kval")
|
$("#form_editor-kval")
|
||||||
.css('display', 'none');
|
.css('display', 'none');
|
||||||
$("#form_editor-nodesep")
|
$("#form_editor-nodesep")
|
||||||
.css('display', '');
|
.css('display', 'none');
|
||||||
}
|
}
|
||||||
else if (method == 'neato') {
|
else if (method == 'neato') {
|
||||||
$("#form_editor-ranksep")
|
$("#form_editor-ranksep")
|
||||||
|
|
Loading…
Reference in New Issue