mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
fix selection bounds
increase extra area
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user