Snap in the logic and flow examples [message #140338] |
Mon, 28 June 2004 01:17  |
Eclipse User |
|
|
|
I'm trying to use the snap to geometry feature much like it is implemented
in the GEF logic and flow examples. I have a certain EditPart that I want
to snap when the connection tool is active (e.g. when I am connecting
items and the cursor gets close to something of this type of edit part, I
want to snap to that object).
It seems in the logic and flow examples that this is the functionality for
the connect tools. However, in searching these code package trees, I find
no reference to the word 'snap'.
Can someone point me in the right direction please? If you could respond
via e-mail as well as post that'd be great.
LFW
|
|
|
Re: Snap in the logic and flow examples [message #140473 is a reply to message #140338] |
Mon, 28 June 2004 14:52  |
Eclipse User |
|
|
|
I think you are confusing Snap To Geometry (it's not available in the flow
example) with something else. Creation tools snap to the closest anchor
point once a target editpart has been set. They invoke
getTargetConnectionAnchor(Request) -- declared on NodeEditPart -- to
determine the closest anchor and snap to it (if there is one). In the case
of the logic and flow examples, the target is only known once you enter that
part's bounds (i.e., when you are on it, not close to it). If you want to
snap when you are close to an editpart, you would have to somehow set the
target editpart when one is in close proximity.
"Larry Waldman" <lfw@andrew.cmu.edu> wrote in message
news:cbo9kn$8g2$1@eclipse.org...
> I'm trying to use the snap to geometry feature much like it is implemented
> in the GEF logic and flow examples. I have a certain EditPart that I want
> to snap when the connection tool is active (e.g. when I am connecting
> items and the cursor gets close to something of this type of edit part, I
> want to snap to that object).
>
> It seems in the logic and flow examples that this is the functionality for
> the connect tools. However, in searching these code package trees, I find
> no reference to the word 'snap'.
>
> Can someone point me in the right direction please? If you could respond
> via e-mail as well as post that'd be great.
>
> LFW
>
|
|
|
Powered by
FUDForum. Page generated in 0.10148 seconds