Commit 645dea95 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

default text align for species should be centered

parent 9b0c5666
......@@ -17,6 +17,7 @@ import lcsb.mapviewer.model.LogMarker;
import lcsb.mapviewer.model.ProjectLogEntryType;
import lcsb.mapviewer.model.graphics.HorizontalAlign;
import lcsb.mapviewer.model.graphics.VerticalAlign;
import lcsb.mapviewer.model.map.compartment.Compartment;
import lcsb.mapviewer.model.map.species.Element;
public abstract class SbmlElementParser<T extends org.sbml.jsbml.Symbol> extends SbmlBioEntityParser {
......@@ -114,8 +115,12 @@ public abstract class SbmlElementParser<T extends org.sbml.jsbml.Symbol> extends
source.setNameY(box.getPosition().getY());
source.setNameWidth(box.getDimensions().getWidth());
source.setNameHeight(box.getDimensions().getHeight());
source.setNameHorizontalAlign(HorizontalAlign.LEFT);
source.setNameVerticalAlign(VerticalAlign.TOP);
source.setNameHorizontalAlign(HorizontalAlign.CENTER);
source.setNameVerticalAlign(VerticalAlign.MIDDLE);
if (source instanceof Compartment) {
source.setNameHorizontalAlign(HorizontalAlign.LEFT);
source.setNameVerticalAlign(VerticalAlign.TOP);
}
LocalStyle style = getStyleForGlyph(textGlyph);
if (style != null) {
RenderGroup group = style.getGroup();
......
Supports Markdown
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