diff --git a/org.eclipse.draw2d/src/org/eclipse/draw2d/ConnectionEndpointLocator.java b/org.eclipse.draw2d/src/org/eclipse/draw2d/ConnectionEndpointLocator.java index 0454737..a0fce9a 100644 --- a/org.eclipse.draw2d/src/org/eclipse/draw2d/ConnectionEndpointLocator.java +++ b/org.eclipse.draw2d/src/org/eclipse/draw2d/ConnectionEndpointLocator.java @@ -213,6 +213,12 @@ int quadrant; if (connOwner != null) { + + // *********************** Fix part 1: switch to relative ********** + connOwner.translateToRelative(startPoint); + connOwner.translateToRelative(endPoint); + // *********************** End of fix part 1 *********************** + Rectangle connOwnerBounds = connOwner.getBounds(); Point connOwnerCenter = connOwnerBounds.getCenter(); Point connOwnerTL = connOwnerBounds.getTopLeft(); @@ -251,6 +257,13 @@ figureBounds.setSize(transposer.t(figureSize)); figureBounds.setLocation(transposer.t(figurePoint)); + + // *********************** Fix part 2: come back to absolute ******* + if (connOwner != null) { + connOwner.translateToAbsolute(figureBounds); + } + // *********************** End of fix part 2 *********************** + figure.setBounds(figureBounds); }