Skip to content
Snippets Groups Projects
Commit 28adcf50 authored by Ulrich Schöpp's avatar Ulrich Schöpp
Browse files

Fix position of anchorages when dragging

While dragging a port of a component, the port was not directly under
the mouse, but slightly to the side. This patch centers the port under
the mouse.

Issue-Ref: 3924
Issue-Url: https://af3-developer.fortiss.org/issues/3924


Signed-off-by: default avatarUlrich Schöpp <schoepp@fortiss.org>
parent 7510684f
No related branches found
No related tags found
1 merge request!89[3924] Fix small bugs in fx diagram editor
DiamondResizableContentControllerBase.java 31f227e88205bd2e131326bdddd8421991b47d79 YELLOW
RectangularContentAnchorageMoveController.java c119b011f5a38933cee07b8082fcd44c6c3b0037 YELLOW
RectangularContentAnchorageMoveController.java 78b55be1a974ee1bca89a7934afb504f56bd495a YELLOW
RectangularResizableContentControllerBase.java 262b083e4e0ce842b0bb8fbb594585e9f0d2f678 YELLOW
RhomboidContentAnchorageMoveController.java fbd40ce483f99c18cfa94076374f572bb72c2646 YELLOW
RhomboidResizableContentControllerBase.java 863b9eae49bad18f71b20c8cde4b0f350348aa27 YELLOW
......@@ -44,8 +44,9 @@ public class RectangularContentAnchorageMoveController extends ContentAnchorageM
Dimension2D anchorageSize =
new Dimension2D(anchorageBounds.getWidth(), anchorageBounds.getHeight());
Dimension2D borderSnap = overrideBorderSnap(anchorageSize);
DiagramCoordinate p = new DiagramCoordinate(anchorageBounds.getMinX() + delta.getX(),
anchorageBounds.getMinY() + delta.getY());
DiagramCoordinate p = new DiagramCoordinate(
anchorageBounds.getMinX() + anchorageSize.getWidth() / 2 + delta.getX(),
anchorageBounds.getMinY() + anchorageSize.getHeight() / 2 + delta.getY());
return getClosestLocationOnBounds(p, contentBounds, anchorageSize, borderSnap);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment