From 145f253826a309467571712056364503172ba990 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Wed, 29 Aug 2018 09:31:14 +0200 Subject: [PATCH] central line in reduced notation should be drawn differently --- .../java/lcsb/mapviewer/model/map/reaction/Reaction.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/model/src/main/java/lcsb/mapviewer/model/map/reaction/Reaction.java b/model/src/main/java/lcsb/mapviewer/model/map/reaction/Reaction.java index 0d1ce039b1..84d23941b6 100644 --- a/model/src/main/java/lcsb/mapviewer/model/map/reaction/Reaction.java +++ b/model/src/main/java/lcsb/mapviewer/model/map/reaction/Reaction.java @@ -45,6 +45,7 @@ import lcsb.mapviewer.model.map.kinetics.SbmlKinetics; import lcsb.mapviewer.model.map.model.Model; import lcsb.mapviewer.model.map.model.ModelData; import lcsb.mapviewer.model.map.reaction.type.ReactionRect; +import lcsb.mapviewer.model.map.reaction.type.ReducedNotation; import lcsb.mapviewer.model.map.reaction.type.TwoProductReactionInterface; import lcsb.mapviewer.model.map.reaction.type.TwoReactantReactionInterface; import lcsb.mapviewer.model.map.species.Element; @@ -469,9 +470,7 @@ public class Reaction implements BioEntity { if (firstOperator != null) { startPoint = firstOperator.getLine().getPoints().get(firstOperator.getLine().getPoints().size() - 2); } - } - - if (this instanceof TwoProductReactionInterface) { + } else if (this instanceof TwoProductReactionInterface) { NodeOperator firstOperator = null; @@ -483,6 +482,9 @@ public class Reaction implements BioEntity { if (firstOperator != null) { endPoint = firstOperator.getLine().getPoints().get(firstOperator.getLine().getPoints().size() - 2); } + } else if (this instanceof ReducedNotation) { + startPoint = reactant.getLine().getEndPoint(); + endPoint = product.getLine().getBeginPoint(); } return new Line2D.Double(startPoint, endPoint); -- GitLab