Added lost code
This commit is contained in:
parent
7b956e8ef6
commit
21bbfb557b
|
@ -342,6 +342,7 @@ function networkmap_db_node_to_js_node($node, &$count, &$count_item_holding_area
|
||||||
$item['py'] = (int)$node['y'];
|
$item['py'] = (int)$node['y'];
|
||||||
$item['z'] = (int)$node['z'];
|
$item['z'] = (int)$node['z'];
|
||||||
$item['state'] = $node['state'];
|
$item['state'] = $node['state'];
|
||||||
|
$item['deleted'] = $node['deleted'];
|
||||||
if ($item['state'] == 'holding_area') {
|
if ($item['state'] == 'holding_area') {
|
||||||
//40 = DEFAULT NODE RADIUS
|
//40 = DEFAULT NODE RADIUS
|
||||||
//30 = for to align
|
//30 = for to align
|
||||||
|
@ -520,6 +521,7 @@ function networkmap_links_to_js_links($relations, $nodes_graph) {
|
||||||
$item['id_agent_end'] = (int)$id_target_agent;
|
$item['id_agent_end'] = (int)$id_target_agent;
|
||||||
$item['target'] = -1;
|
$item['target'] = -1;
|
||||||
$item['source'] = -1;
|
$item['source'] = -1;
|
||||||
|
$item['deleted'] = $relation['deleted'];
|
||||||
|
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
$target_and_source = array();
|
$target_and_source = array();
|
||||||
|
@ -717,7 +719,9 @@ function networkmap_write_js_array($id, $nodes_and_relations = array(), $map_das
|
||||||
|
|
||||||
$item = networkmap_db_node_to_js_node(
|
$item = networkmap_db_node_to_js_node(
|
||||||
$node, $count, $count_item_holding_area);
|
$node, $count, $count_item_holding_area);
|
||||||
|
if ($item['deleted']) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
echo "networkmap.nodes.push(" . json_encode($item) . ");\n";
|
echo "networkmap.nodes.push(" . json_encode($item) . ");\n";
|
||||||
$nodes_graph[$item['id']] = $item;
|
$nodes_graph[$item['id']] = $item;
|
||||||
}
|
}
|
||||||
|
@ -733,6 +737,9 @@ function networkmap_write_js_array($id, $nodes_and_relations = array(), $map_das
|
||||||
$links_js = networkmap_links_to_js_links($relations, $nodes_graph);
|
$links_js = networkmap_links_to_js_links($relations, $nodes_graph);
|
||||||
|
|
||||||
foreach ($links_js as $link_js) {
|
foreach ($links_js as $link_js) {
|
||||||
|
if ($link_js['deleted']) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($link_js['target'] == -1)
|
if ($link_js['target'] == -1)
|
||||||
continue;
|
continue;
|
||||||
if ($link_js['source'] == -1)
|
if ($link_js['source'] == -1)
|
||||||
|
|
|
@ -2155,6 +2155,7 @@ function refresh_holding_area() {
|
||||||
temp_node['image_url'] = node['image_url'];
|
temp_node['image_url'] = node['image_url'];
|
||||||
temp_node['image_width'] = node['image_width'];
|
temp_node['image_width'] = node['image_width'];
|
||||||
temp_node['image_height'] = node['image_width'];
|
temp_node['image_height'] = node['image_width'];
|
||||||
|
temp_node['deleted'] = false;
|
||||||
|
|
||||||
graph.nodes.push(temp_node);
|
graph.nodes.push(temp_node);
|
||||||
});
|
});
|
||||||
|
@ -3149,10 +3150,19 @@ function myMouseoutRhombusFunction(node_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function draw_elements_graph() {
|
function draw_elements_graph() {
|
||||||
link = link.data(force.links(), function (d) {
|
link = link.data(force.links().filter(function(d, i) {
|
||||||
|
if (d['deleted']) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
function (d) {
|
||||||
return d.source.id + networkmap_id + "-" + d.target.id + networkmap_id + Math.random();
|
return d.source.id + networkmap_id + "-" + d.target.id + networkmap_id + Math.random();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
link_temp = link.enter()
|
link_temp = link.enter()
|
||||||
.append("g")
|
.append("g")
|
||||||
.attr("id", function (d) {
|
.attr("id", function (d) {
|
||||||
|
@ -3333,7 +3343,14 @@ function draw_elements_graph() {
|
||||||
return (Array(25).join(" ")) + text_link;
|
return (Array(25).join(" ")) + text_link;
|
||||||
});
|
});
|
||||||
|
|
||||||
node = node.data(force.nodes(), function (d) { return d.id; });
|
node = node.data(force.nodes().filter(function(d, i) {
|
||||||
|
if (d['deleted']) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}), function (d) { return d.id; });
|
||||||
|
|
||||||
node_temp = node.enter()
|
node_temp = node.enter()
|
||||||
.append("g")
|
.append("g")
|
||||||
|
|
Loading…
Reference in New Issue