Commit 7ba129b9 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

polygon was not used for creating part of the map

parent 2beedcd6
Pipeline #28799 passed with stage
in 11 minutes and 6 seconds
......@@ -8,6 +8,8 @@ minerva (15.1.0) unstable; urgency=medium
(#1254)
* Small improvement: in SBML render stroke color for glyphs is used for
defining font color
* Bug fix: export to image from selected polygon contained all elements
inside rectangle bounded by the polygon coordinates (#1096)
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 18 Jun 2020 16:00:00 +0200
......
......@@ -325,6 +325,9 @@ public class ModelRestImpl extends BaseRestImpl {
Path2D polygon = stringToPolygon(polygonString, colorModel);
SubModelCommand subModelCommand = new SubModelCommand(originalModel, polygon);
Model part = subModelCommand.execute();
Double minX = originalModel.getWidth();
Double minY = originalModel.getHeight();
Double maxX = 0.0;
......@@ -357,7 +360,7 @@ public class ModelRestImpl extends BaseRestImpl {
Params params = new Params().x(minX).y(minY).height((maxY - minY) / scale).width((maxX - minX) / scale)
.level(level - Configuration.MIN_ZOOM_LEVEL).nested(false).// automatically set nested view as invalid
scale(scale).colorExtractor(colorExtractor).sbgn(topModel.getProject().isSbgnFormat()).model(colorModel);
scale(scale).colorExtractor(colorExtractor).sbgn(topModel.getProject().isSbgnFormat()).model(part);
if (overlay != null) {
params.nested(overlay.isHierarchicalView());
}
......
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