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

z index of structural state and modification residue must be on top of species

parent 432d535e
......@@ -271,4 +271,14 @@ public class State extends GraphicalPathwayElement {
this.typeName = typeName;
}
@Override
public Integer getzOrder() {
throw new UnsupportedOperationException();
}
@Override
public void setzOrder(final Integer z) {
throw new UnsupportedOperationException();
}
}
......@@ -246,8 +246,8 @@ public class ModelContructor {
}
/**
* This function adds {@link Complex} to model from graph. ComplexName is set as
* groupId from GPML
* This function adds {@link Complex} to model from graph. ComplexName is set
* as groupId from GPML
*
* @param groups
* list of groups
......@@ -289,7 +289,8 @@ public class ModelContructor {
}
/**
* This function adds Species, TextLabels, final Compartments and Shapes from graph.
* This function adds Species, TextLabels, final Compartments and Shapes from
* graph.
*
* @param model
* model to which species will be added
......@@ -379,7 +380,9 @@ public class ModelContructor {
Double x = state.getRelX() * species.getWidth() / 2 + species.getCenterX();
Double y = state.getRelY() * species.getHeight() / 2 + species.getCenterY();
mr.setPosition(new Point2D.Double(x, y));
mr.setZ(species.getZ());
if (species.getZ() != null) {
mr.setZ(species.getZ() + 1);
}
}
} else if (state.getStructuralState() != null) {
if (species instanceof Protein) {
......@@ -406,7 +409,9 @@ public class ModelContructor {
structuralState.setHeight(state.getHeight());
structuralState.setWidth(state.getWidth());
structuralState.setValue(state.getStructuralState());
structuralState.setZ(species.getZ());
if (species.getZ() != null) {
structuralState.setZ(species.getZ() + 1);
}
return structuralState;
}
......@@ -1213,7 +1218,8 @@ public class ModelContructor {
}
/**
* Tries to find a name to assign to complexes if complexes don't contain them.
* Tries to find a name to assign to complexes if complexes don't contain
* them.
*
* @param model
* model where complexes are placed
......@@ -1276,8 +1282,8 @@ public class ModelContructor {
}
/**
* Tries to find a name to assign to compartments if compartments don't contain
* them.
* Tries to find a name to assign to compartments if compartments don't
* contain them.
*
* @param model
* model where compartments are placed
......@@ -1327,8 +1333,8 @@ public class ModelContructor {
}
/**
* By default gpml doesn't offer information about compartments structure. This
* function fixes assignments to compartment and compartment aliases.
* By default gpml doesn't offer information about compartments structure.
* This function fixes assignments to compartment and compartment aliases.
*
* @param model
* model where assignments are fixed.
......
......@@ -260,6 +260,7 @@ public class ModelToGPMLTest extends WikipathwaysTestFunctions {
Residue residue = new Residue("mr" + speciesCounter++);
residue.setState(ModificationState.PHOSPHORYLATED);
residue.setPosition(new Point2D.Double(p1.getCenterX(), p1.getY()));
residue.setZ(p1.getZ() + 1);
return residue;
}
......
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