fixed d&d jumping issue when zoomed

This commit is contained in:
bancika
2011-01-08 14:00:56 +00:00
parent 93ac7b24d1
commit 8a115e5cbd
3 changed files with 6 additions and 2 deletions
@@ -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>
@@ -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);