Commit 2da95dd8 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

center line should have proper line type assigned

parent b5786fc0
......@@ -681,6 +681,7 @@ public class ReactionFromXml {
PolylineData centerLine = new PolylineData();
centerLine.addPoint(pointTransformation.copyPoint(reactant.getLine().getEndPoint()));
centerLine.addPoint(pointTransformation.copyPoint(operator.getLine().getEndPoint()));
centerLine.setType(reactant.getLine().getType());
result.setLine(centerLine);
}
......@@ -897,6 +898,7 @@ public class ReactionFromXml {
PolylineData centerLine = new PolylineData();
centerLine.addPoint(pointTransformation.copyPoint(andOperator.getLine().getEndPoint()));
centerLine.addPoint(pointTransformation.copyPoint(product.getLine().getBeginPoint()));
centerLine.setType(product.getLine().getType());
result.setLine(centerLine);
} else {
......@@ -953,6 +955,7 @@ public class ReactionFromXml {
PolylineData centerLine = new PolylineData();
centerLine.addPoint(pointTransformation.copyPoint(secondPoint));
centerLine.addPoint(pointTransformation.copyPoint(thirdPoint));
centerLine.setType(product.getLine().getType());
result.setLine(centerLine);
// product line is not trimmed
......@@ -1185,16 +1188,17 @@ public class ReactionFromXml {
reactant.setLine(reactantLine);
product.setLine(productLine);
PolylineData reactionLine = new PolylineData();
reactionLine.addPoint(pointTransformation.copyPoint(reactantLine.getEndPoint()));
reactionLine.addPoint(pointTransformation.copyPoint(productLine.getBeginPoint()));
reaction.setLine(reactionLine);
ReactionLineData rld = ReactionLineData.getByReactionType(reaction.getClass());
reactantLine.setType(rld.getLineType());
productLine.setType(rld.getLineType());
productLine.getEndAtd().setArrowType(rld.getProductArrowType());
productLine.trimEnd(rld.getProductLineTrim());
PolylineData reactionLine = new PolylineData();
reactionLine.addPoint(pointTransformation.copyPoint(reactantLine.getEndPoint()));
reactionLine.addPoint(pointTransformation.copyPoint(productLine.getBeginPoint()));
reactionLine.setType(reactantLine.getType());
reaction.setLine(reactionLine);
}
/**
......
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