Merge branch '1240-fictional-node-link-to-other-map-dev' into 'develop'

Added function to update link to other map

See merge request artica/pandorafms!990
This commit is contained in:
vgilc 2017-11-15 09:45:03 +01:00
commit faac4fa46f
1 changed files with 8 additions and 0 deletions

View File

@ -212,6 +212,7 @@ function networkmap_process_networkmap($id = 0) {
$style['width'] = $node['width'];
$style['height'] = $node['height'];
$style['label'] = $node['text'];
$style['id_networkmap'] = $node['networkmap'];
$nodes_and_relations['nodes'][$index]['style'] = json_encode($style);
$index++;
@ -400,6 +401,13 @@ function networkmap_db_node_to_js_node($node, &$count, &$count_item_holding_area
$item['map_id'] = $node['id_map'];
}
if (!isset($node['style']['id_networkmap']) || $node['style']['id_networkmap'] == '' || $node['style']['id_networkmap'] == 0) {
$item['networkmap_id'] = 0;
}
else {
$item['networkmap_id'] = $node['style']['id_networkmap'];
}
$count++;
return $item;