mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
fixed d&d jumping issue when zoomed
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
<map>
|
<map>
|
||||||
|
<entry>
|
||||||
|
<string>defaults</string>
|
||||||
|
<map/>
|
||||||
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<string>metric</string>
|
<string>metric</string>
|
||||||
<boolean>true</boolean>
|
<boolean>true</boolean>
|
||||||
|
|||||||
Binary file not shown.
+2
-2
@@ -560,8 +560,8 @@ public class Presenter implements IPlugInPort {
|
|||||||
boolean repaint = false;
|
boolean repaint = false;
|
||||||
if (!controlPointMap.isEmpty()) {
|
if (!controlPointMap.isEmpty()) {
|
||||||
// We're dragging control point(s).
|
// We're dragging control point(s).
|
||||||
int dx = (point.x - previousDragPoint.x);
|
int dx = (scaledPoint.x - previousDragPoint.x);
|
||||||
int dy = (point.y - previousDragPoint.y);
|
int dy = (scaledPoint.y - previousDragPoint.y);
|
||||||
if (snapToGrid) {
|
if (snapToGrid) {
|
||||||
dx = (int) (Math.round(dx / Constants.GRID) * Constants.GRID);
|
dx = (int) (Math.round(dx / Constants.GRID) * Constants.GRID);
|
||||||
dy = (int) (Math.round(dy / Constants.GRID) * Constants.GRID);
|
dy = (int) (Math.round(dy / Constants.GRID) * Constants.GRID);
|
||||||
|
|||||||
Reference in New Issue
Block a user