Working in the fixes of A-M-M-A arrows.
This commit is contained in:
parent
995187d02a
commit
f16a6a812e
|
@ -300,6 +300,19 @@ class Networkmap extends Map {
|
||||||
|
|
||||||
$this->nodes = $nodes;
|
$this->nodes = $nodes;
|
||||||
$this->edges = $edges;
|
$this->edges = $edges;
|
||||||
|
|
||||||
|
html_debug("--------------nodes------------------------", true);
|
||||||
|
$lines = "";
|
||||||
|
foreach ($nodes as $n) {
|
||||||
|
$lines .= $n['graph_id']."|".$n['id']."(".$n['id_agent'].")"."|".$n['type']."|".$n['title']."\n";
|
||||||
|
}
|
||||||
|
html_debug($lines, true);
|
||||||
|
html_debug("--------------edges------------------------", true);
|
||||||
|
$lines = "";
|
||||||
|
foreach ($edges as $e) {
|
||||||
|
$lines .= $e['to']."|".$e['from']."\n";
|
||||||
|
}
|
||||||
|
html_debug($lines, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceGroup() {
|
public function getSourceGroup() {
|
||||||
|
|
|
@ -248,6 +248,32 @@ NetworkmapController.prototype.get_arrow_AMMA = function(id_to, id_from) {
|
||||||
console.log("arrows_to", arrows_to);
|
console.log("arrows_to", arrows_to);
|
||||||
console.log("arrows_from", arrows_from);
|
console.log("arrows_from", arrows_from);
|
||||||
|
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
//------ INIT CODE -- get arrow A-M from M-M --------------------
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
var arrow_to = null;
|
||||||
|
$.each(arrows_to, function(i, arw) {
|
||||||
|
if (arw['graph_id'] != arrow_MM['arrow']['graph_id']) {
|
||||||
|
node = null;
|
||||||
|
|
||||||
|
if (arw['to'] == arrow_MM['arrow']['to']) {
|
||||||
|
node = self.get_node(arw['from']);
|
||||||
|
}
|
||||||
|
else if (arw['from'] == arrow_MM['arrow']['to']) {
|
||||||
|
node = self.get_node(arw['to']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node['type'] == ITEM_TYPE_AGENT_NETWORKMAP &&
|
||||||
|
node['id'] == arrow_MM['nodes']['to']['id_agent']) {
|
||||||
|
|
||||||
|
arrow_to = node;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
//------ END CODE --- get arrow A-M from M-M --------------------
|
||||||
|
//--------------------------------------------------------------
|
||||||
|
|
||||||
var temp = null;
|
var temp = null;
|
||||||
$.each(arrows_to, function(i, arrow_to) {
|
$.each(arrows_to, function(i, arrow_to) {
|
||||||
if (arrow_to['graph_id'] != arrow_MM['arrow']['graph_id']) {
|
if (arrow_to['graph_id'] != arrow_MM['arrow']['graph_id']) {
|
||||||
|
|
Loading…
Reference in New Issue