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>
|
||||
<entry>
|
||||
<string>defaults</string>
|
||||
<map/>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>metric</string>
|
||||
<boolean>true</boolean>
|
||||
|
||||
Binary file not shown.
+2
-2
@@ -560,8 +560,8 @@ public class Presenter implements IPlugInPort {
|
||||
boolean repaint = false;
|
||||
if (!controlPointMap.isEmpty()) {
|
||||
// We're dragging control point(s).
|
||||
int dx = (point.x - previousDragPoint.x);
|
||||
int dy = (point.y - previousDragPoint.y);
|
||||
int dx = (scaledPoint.x - previousDragPoint.x);
|
||||
int dy = (scaledPoint.y - previousDragPoint.y);
|
||||
if (snapToGrid) {
|
||||
dx = (int) (Math.round(dx / Constants.GRID) * Constants.GRID);
|
||||
dy = (int) (Math.round(dy / Constants.GRID) * Constants.GRID);
|
||||
|
||||
Reference in New Issue
Block a user