
Predict Connections - limiting allowed connections or BeforeConnection type even
I am currently trying to figure this out as well. Does
anyone have any ideas? To be more specific I have 2-D
shapes and 1-D connectors. I want connectors to be able
to connect to any 2-D shape but not any other 1-D shape.
Right now if the user tries to connect two connectors to
the same 1-D shape at the same connection point it
sometimes makes the new connection between the two
connectors instead of between the connector and the 2-D
shape.
Andrew - How did you disconnect the shapes in code? I
have tried moving the shape slightly away but it still
remembers the connection.
Quote:
>-----Original Message-----
>When I move a One-D connector in contact to a 2-D shape
>connection point to do the connection, I see a small red-
>square surrounding the connection point, which indicates
>that the connection is sucessfull. This is fine. But in
my
>project, each shape has its meaning and sometimes certain
>connections are considered to be invalid and I should not
>allow that connections happening. What I currently do is
>to connect them first (see the red square) then if it is
>invalid, I disconnect it right away (whether the
>connection is valid or not is determined by code). This
is
>not the perfect way and I am looking for a way so that I
>can know the connection is invalid before the connection
>occur. The best thing is that when a connection is
>invalid, instead of showing a red square, another colored
>square appear to indication the invalidation. Can I do
>that? Thanks.
>Andrew
>.
.