board improvements

show point for non-stretchable components too
This commit is contained in:
bancika
2011-01-17 00:19:47 +00:00
parent c02b37bcba
commit 6dba12eab8
7 changed files with 34 additions and 14 deletions
@@ -418,7 +418,8 @@ public class Presenter implements IPlugInPort {
Map<IDIYComponent<?>, Set<Integer>> components = new HashMap<IDIYComponent<?>, Set<Integer>>();
Point scaledPoint = scalePoint(point);
if (componentSlot != null
&& componentSlot.getCreationMethod() == CreationMethod.POINT_BY_POINT) {
&& (componentSlot.getCreationMethod() == CreationMethod.POINT_BY_POINT || !componentSlot
.isStretchable())) {
potentialControlPoint = scaledPoint;
snapPointToGrid(potentialControlPoint);
messageDispatcher.dispatchMessage(EventType.REPAINT);
@@ -7,7 +7,7 @@ import java.awt.Stroke;
public class Constants {
public static final int PIXELS_PER_INCH = 120;//Toolkit.getDefaultToolkit().getScreenResolution();
public static final int PIXELS_PER_INCH = 150;//Toolkit.getDefaultToolkit().getScreenResolution();
public static int GRIDS_PER_INCH = 8;
// public static Size GRID_SIZE = new Size(1d / GRIDS_PER_INCH, SizeUnit.in);
// public static final int GRID = 20;