mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 09:12:09 +10:00
Snap to grid after releasing Ctrl button and creating a new component
This commit is contained in:
+7
@@ -706,6 +706,13 @@ public class Presenter implements IPlugInPort {
|
|||||||
@Override
|
@Override
|
||||||
public void mouseMoved(Point point, boolean ctrlDown, boolean shiftDown,
|
public void mouseMoved(Point point, boolean ctrlDown, boolean shiftDown,
|
||||||
boolean altDown) {
|
boolean altDown) {
|
||||||
|
|
||||||
|
if (shiftDown) {
|
||||||
|
dragAction = IPlugInPort.DND_TOGGLE_SNAP;
|
||||||
|
} else {
|
||||||
|
dragAction = 0;
|
||||||
|
}
|
||||||
|
|
||||||
Map<IDIYComponent<?>, Set<Integer>> components = new HashMap<IDIYComponent<?>, Set<Integer>>();
|
Map<IDIYComponent<?>, Set<Integer>> components = new HashMap<IDIYComponent<?>, Set<Integer>>();
|
||||||
this.previousScaledPoint = scalePoint(point);
|
this.previousScaledPoint = scalePoint(point);
|
||||||
if (instantiationManager.getComponentTypeSlot() != null) {
|
if (instantiationManager.getComponentTypeSlot() != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user