fixed errors map ipam

Former-commit-id: 9a1e5460ab40d22135edc75f2adf186f8d56f3d4
This commit is contained in:
Daniel Barbero 2019-04-05 16:43:36 +02:00
parent 970a10ba50
commit 4808e4ae97
1 changed files with 11 additions and 0 deletions

View File

@ -1616,6 +1616,16 @@ class NetworkMap
if (is_array($node['style']) === false) { if (is_array($node['style']) === false) {
$node['style'] = json_decode($node['style'], true); $node['style'] = json_decode($node['style'], true);
// Add styles.
if (isset($source_data['style']) === true
&& is_array($source_data['style']) === true
) {
$node['style'] = array_merge(
$node['style'],
$source_data['style']
);
}
} }
// Propagate styles. // Propagate styles.
@ -2722,6 +2732,7 @@ class NetworkMap
} }
$this->nodesJS = $this->nodesToJS($nodes); $this->nodesJS = $this->nodesToJS($nodes);
$output .= 'networkmap.nodes = ('.json_encode($this->nodesJS).");\n"; $output .= 'networkmap.nodes = ('.json_encode($this->nodesJS).");\n";
// Clean. // Clean.