Commit e62c4bdc authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1303-gpml-reaction-line-color' into 'devel_15.0.x'

export color and line type for all nodes

See merge request !1206
parents 81edecf2 2abe524c
Pipeline #29122 passed with stage
in 14 minutes and 6 seconds
......@@ -4,6 +4,8 @@ minerva (15.0.2) stable; urgency=medium
* Bug fix: map notes were not exported to GPML
* Bug fix: reaction notes were not imported from GPML
* Bug fix: export of notes could create invalid GPML file (#1299)
* Bug fix: there was an issue with exporting color and line type of reaction
additional reactant/product (#1303)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 29 Jun 2020 11:00:00 +0200
......
......@@ -386,13 +386,20 @@ public class ModelToGPML {
Point2D pe = line.getEndPoint();
double anchorPosition = -1;
String lineStyle = GpmlLineType.getByLineType(rn.getLine().getType()).getGpmlString();
interaction.append(" <Interaction GraphId=\"" + getNewId() + "\">\n");
interaction.append(" <Attribute Key=\"org.pathvisio.core.ds\" Value=\"\"/>\n");
interaction.append(" <Attribute Key=\"org.pathvisio.core.id\" Value=\"\"/>\n");
interaction.append(" <Graphics "
+ "ConnectorType=\"Segmented\" "
+ "ZOrder=\"" + rn.getReaction().getZ() + "\" "
+ "LineThickness=\"" + rn.getLine().getWidth() + "\">\n");
+ "Color=\"" + colorToString(rn.getLine().getColor()) + "\" ");
if (lineStyle != null) {
interaction.append("LineStyle=\"" + lineStyle + "\" ");
}
interaction.append("LineThickness=\"" + rn.getLine().getWidth() + "\">\n");
String reactionArrowHead = InteractionMapping
.getGpmlInteractionTypeForMinervaReactionClass(rn.getReaction().getClass())
......@@ -734,8 +741,6 @@ public class ModelToGPML {
}
interactions.append("LineThickness=\"" + reaction.getLine().getWidth() + "\">\n");
/** Start and End **/
Reactant start = reaction.getReactants().get(0);
Product end = reaction.getProducts().get(0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment