diff --git a/CHANGELOG b/CHANGELOG index 64ccace37428560e78ff59b6c9d27a1b74172ebd..4c2cfd9bd370302675b61362a25b0b36dd5365d4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +minerva (15.0.0~alpha.0) stable; urgency=medium + * Bug fix: position of structural state is preserved on upload CellDesigner + file (#671) + minerva (14.0.3) stable; urgency=medium * Bug fix: default zoom level on main map works even when x or y are undefined (#993) diff --git a/converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/bioEntity/element/species/SpeciesConverter.java b/converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/bioEntity/element/species/SpeciesConverter.java index 6f553354fde8a62825bd86251477d6b3a6d7dfe9..65cf866433d187701eedd45620a90e11e3a42d66 100644 --- a/converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/bioEntity/element/species/SpeciesConverter.java +++ b/converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/bioEntity/element/species/SpeciesConverter.java @@ -329,17 +329,18 @@ public abstract class SpeciesConverter<T extends Species> extends ElementConvert graphics.setColor(c); graphics.draw(ellipse); if (!state.getValue().equals("")) { - Font font = new Font(Font.SANS_SERIF, 0, state.getHeight().intValue()); + Font tmpFont = graphics.getFont(); + Font font = new Font(Font.SANS_SERIF, 0, state.getFontSize().intValue()); graphics.setFont(font); width = graphics.getFontMetrics().stringWidth(state.getValue()); height = graphics.getFontMetrics().getAscent() - graphics.getFontMetrics().getDescent(); double x = state.getPosition().getX() + (state.getWidth() - width) / 2; - double y = state.getPosition().getY() + (state.getHeight() - height) / 2; + double y = state.getPosition().getY() + (state.getHeight() + height) / 2; graphics.drawString(state.getValue(), (int) x, (int) y); - graphics.setFont(font); + graphics.setFont(tmpFont); } }