Commit 91e86f7b authored by Piotr Gawron's avatar Piotr Gawron
Browse files

remove duplicate entries from line

parent e67903a5
......@@ -1156,20 +1156,6 @@ public class SbgnmlXmlParser {
}
}
/**
* Returns center point for given process.
*
* @param p
* completely parsed process to compute center point from
* @return center point for given process
*/
private Point2D getCenterPointFromProcess(Process p) {
Double centralPointX = new Double(p.getCentralPoint().getBbox().getX() + p.getCentralPoint().getBbox().getW() / 2);
Double centralPointY = new Double(p.getCentralPoint().getBbox().getY() + p.getCentralPoint().getBbox().getH() / 2);
Point2D centerOfReactionPoint = new Point2D.Double(centralPointX, centralPointY);
return centerOfReactionPoint;
}
/**
* Returns proper Reaction object based on given glyph clazz.
*
......@@ -1255,11 +1241,6 @@ public class SbgnmlXmlParser {
Glyph source = (Glyph) a.getSource();
reactant.setElement(model.getElementByElementId(source.getId()));
List<Point2D> pointList = getLinePoints(a);
if (p.getReagentArcs().size() == 1) {
pointList.add(getCenterPointFromProcess(p));
} else {
pointList.add(pointList.get(pointList.size() - 1));
}
PolylineData line = parseLine(a, pointList);
reactant.setLine(line);
if (andOperator != null) {
......
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