Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320014 - Connection anchor returns wrong position when source is contained within target
Summary: Connection anchor returns wrong position when source is contained within target
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.4.0   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 1.4.1   Edit
Assignee: Syed Atif CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2010-07-15 12:35 EDT by Syed Atif CLA
Modified: 2010-07-16 15:20 EDT (History)
2 users (show)

See Also:


Attachments
Fix (2.57 KB, patch)
2010-07-15 12:39 EDT, Syed Atif CLA
no flags Details | Diff
Fix (1.92 KB, patch)
2010-07-15 13:07 EDT, Syed Atif CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Syed Atif CLA 2010-07-15 12:35:45 EDT
Build Identifier: org.eclipse.gmf.runtime.draw2d.ui_1.4.0.v20100514-1615

The BaseSlidableAnchor returns an incorrect anchor location when the source figure is contained within the target figure. For example, if the source figure is in the top left portion of the contained figure, and if the user tries to create a connection from the source figure to the bottom right corner, the connection will be created from the source figure to the top left corner instead.

The reason for this behaviour is that the BaseSlidableAnchor tries to determine the closest point to the target figure, and in doing ends up with a position on the top left corner of the (imaginary) line connecting source figure and user location.

Reproducible: Always
Comment 1 Syed Atif CLA 2010-07-15 12:39:17 EDT
Created attachment 174419 [details]
Fix

If the source anchor location is within the the bounds of the target figure, then we do not use the closest point to the source anchor location.
Comment 2 Syed Atif CLA 2010-07-15 13:07:28 EDT
Created attachment 174422 [details]
Fix

Removed the trace statements
Comment 3 Alex Boyko CLA 2010-07-15 16:24:34 EDT
Delivered to HEAD and R1_4_maintenance