fix selection bounds

increase extra area
This commit is contained in:
Branislav Stojkovic
2019-02-05 14:54:39 +01:00
parent 3deb988a06
commit bb564248d9
5 changed files with 10 additions and 3 deletions
@@ -67,7 +67,7 @@ public class DrawingManager {
private static final Logger LOG = Logger.getLogger(DrawingManager.class); private static final Logger LOG = Logger.getLogger(DrawingManager.class);
public static int CONTROL_POINT_SIZE = 7; public static int CONTROL_POINT_SIZE = 7;
public static double EXTRA_SPACE = 0.2; public static double EXTRA_SPACE = 0.25;
public static final String ZOOM_KEY = "zoom"; public static final String ZOOM_KEY = "zoom";
@@ -927,6 +927,15 @@ public class Presenter implements IPlugInPort {
LOG.debug("Area is null for " + c.getName() + " of type " LOG.debug("Area is null for " + c.getName() + " of type "
+ c.getClass().getName()); + c.getClass().getName());
} }
if (ConfigurationManager.getInstance().readBoolean(EXTRA_SPACE_KEY, true)) {
double extraSpace = drawingManager.getExtraSpace(currentProject);
minX += extraSpace;
maxX += extraSpace;
minY += extraSpace;
maxY += extraSpace;
}
if (drawingManager.getZoomLevel() != 1 && applyZoom) { if (drawingManager.getZoomLevel() != 1 && applyZoom) {
minX *= drawingManager.getZoomLevel(); minX *= drawingManager.getZoomLevel();
maxX *= drawingManager.getZoomLevel(); maxX *= drawingManager.getZoomLevel();
Binary file not shown.
Binary file not shown.
@@ -109,8 +109,6 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
private double zoomLevel = 1; private double zoomLevel = 1;
public CanvasPlugin(ISwingUI swingUI) { public CanvasPlugin(ISwingUI swingUI) {
this.swingUI = swingUI; this.swingUI = swingUI;
clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();