Edit report at http://pear.php.net/bugs/bug.php?id=18676&edit=1
ID: 18676
Updated by: [email protected]
Reported By: redvex at me dot com
Summary: Cluster doesn't show if there's no nodes inside.
Status: Open
-Type: Feature/Change Request
+Type: Bug
Package: Image_GraphViz
Operating System: Debian 4.0
Package Version: 1.3.0
PHP Version: 5.2.0
Roadmap Versions:
New Comment:
-Type: Feature/Change Request
+Type: Bug
Thanks Gianni; but could I get you to do this as a patch against svn?
It'll be a lot
easier to see the differences.
Additionally; any chance of a test case to prove your changed
implementation
works/doesn't work?
Previous Comments:
------------------------------------------------------------------------
[2011-07-21 10:14:20] redvex
Description:
------------
Cluster doesn't show if there's no node inside even if it has
other cluster or subgraph inside. To solve it I've changed
function _nodes($nodes, $indent){
$parsedGraph = '';
foreach ($nodes as $node => $attributes) {
$parsedGraph .= $indent.$this->_escape($node);
$attributeList = array();
foreach ($this->_escapeArray($attributes) as $key =>
$value) {
$attributeList[] = $key.'='.$value;
}
if (!empty($attributeList)) {
$parsedGraph .= ' [ '.implode(',', $attributeList).'
]';
}
$parsedGraph .= ";\n";
}
return $parsedGraph;
}
to
function _nodes($nodes, $indent){
$parsedGraph = '';
if (is_array($nodes)){
foreach ($nodes as $node => $attributes) {
$parsedGraph .= $indent.$this-
>_escape($node);
$attributeList = array();
foreach ($this->_escapeArray($attributes) as
$key => $value) {
$attributeList[] = $key.'='.$value;
}
if (!empty($attributeList)) {
$parsedGraph .= ' [ '.implode(',',
$attributeList).' ]';
}
$parsedGraph .= ";\n";
}
}
return $parsedGraph;
}
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18676&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.