Skip to content
Snippets Groups Projects
Commit 688be9a5 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

proper operator type is used for heterodimer association

parent eaecc1df
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!494Conversion rest api scaling
......@@ -25,11 +25,14 @@ import lcsb.mapviewer.model.map.compartment.Compartment;
import lcsb.mapviewer.model.map.model.Model;
import lcsb.mapviewer.model.map.reaction.AbstractNode;
import lcsb.mapviewer.model.map.reaction.AndOperator;
import lcsb.mapviewer.model.map.reaction.AssociationOperator;
import lcsb.mapviewer.model.map.reaction.Modifier;
import lcsb.mapviewer.model.map.reaction.NodeOperator;
import lcsb.mapviewer.model.map.reaction.Product;
import lcsb.mapviewer.model.map.reaction.Reactant;
import lcsb.mapviewer.model.map.reaction.Reaction;
import lcsb.mapviewer.model.map.reaction.SplitOperator;
import lcsb.mapviewer.model.map.reaction.type.HeterodimerAssociationReaction;
import lcsb.mapviewer.model.map.species.Complex;
import lcsb.mapviewer.model.map.species.Element;
import lcsb.mapviewer.model.map.species.Species;
......@@ -240,9 +243,13 @@ public class ApplySimpleLayoutModelCommand extends ApplyLayoutModelCommand {
}
private void modifyReactants(Reaction reaction, Point2D middle) {
AndOperator operator = null;
NodeOperator operator = null;
if (reaction.getReactants().size() > 1) {
operator = new AndOperator();
if (reaction instanceof HeterodimerAssociationReaction) {
operator = new AssociationOperator();
} else {
operator = new AndOperator();
}
Point2D productPoint = reaction.getReactants().get(0).getElement().getCenter();
Point2D operatorPoint = getMiddlePoint(middle, productPoint);
operator.setLine(new PolylineData(middle, operatorPoint));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment