Skip to content

Commit

Permalink
Make dotgraph label nojustify
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Jul 25, 2024
1 parent e9a6a01 commit 191b0c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions tesseract_task_composer/core/src/task_composer_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ TaskComposerGraph::dump(std::ostream& os,

std::ostringstream sub_graphs;
const std::string tmp = toString(uuid_);
os << "subgraph cluster_" << tmp << " {\n color=black;\n label = \"" << name_ << "\\nUUID: " << uuid_str_ << "\\n";
os << "subgraph cluster_" << tmp << " {\n color=black;\n nojustify=true label = \"" << name_
<< "\\nUUID: " << uuid_str_ << "\\l";
os << "Inputs:\\l" << input_keys_;
os << "Outputs:\\l" << output_keys_;
os << "Conditional: " << ((conditional_) ? "True" : "False") << "\\l";
Expand All @@ -378,7 +379,8 @@ TaskComposerGraph::dump(std::ostream& os,
const TaskComposerKeys& input_keys = node->getInputKeys();
const TaskComposerKeys& output_keys = node->getOutputKeys();
os << std::endl
<< tmp << " [shape=box3d, label=\"Subgraph: " << node->name_ << "\\nUUID: " << node->uuid_str_ << "\\n";
<< tmp << " [shape=box3d, nojustify=true label=\"Subgraph: " << node->name_ << "\\nUUID: " << node->uuid_str_
<< "\\l";
os << "Inputs:\\l" << input_keys;
os << "Outputs:\\l" << output_keys;
os << "Conditional: " << ((node->isConditional()) ? "True" : "False") << "\\l";
Expand Down
8 changes: 4 additions & 4 deletions tesseract_task_composer/core/src/task_composer_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ TaskComposerNode::dump(std::ostream& os,

if (conditional_)
{
os << std::endl << tmp << " [shape=diamond, label=\"" << name_ << "\\n";
os << "UUID: " << uuid_str_ << "\\n";
os << std::endl << tmp << " [shape=diamond, nojustify=true label=\"" << name_ << "\\n";
os << "UUID: " << uuid_str_ << "\\l";
os << "Namespace: " << ns_ << "\\l";
os << "Inputs:\\l" << input_keys_;
os << "Outputs:\\l" << output_keys_;
Expand All @@ -386,8 +386,8 @@ TaskComposerNode::dump(std::ostream& os,
}
else
{
os << std::endl << tmp << " [label=\"" << name_ << "\\n";
os << "UUID: " << uuid_str_ << "\\n";
os << std::endl << tmp << " [nojustify=true label=\"" << name_ << "\\n";
os << "UUID: " << uuid_str_ << "\\l";
os << "Namespace: " << ns_ << "\\l";
os << "Inputs:\\l" << input_keys_;
os << "Outputs:\\l" << output_keys_;
Expand Down

0 comments on commit 191b0c9

Please sign in to comment.