REPOST: Marquee + bendpoint selection/move [message #144450] |
Mon, 26 July 2004 15:25  |
Eclipse User |
|
|
|
I wondered if anyone had thoughts on this, I'd really like to try and get
this issue resolved.
> I'm trying to implement functionality whereby when multiple nodes are
> selected and moved (via the marquee tool for example) then any absolute
> bendpoints which live on the connections between two nodes being moved,
> are also moved. This question has been asked a number of times before,
> and I have been following the following suggestion made by Randy:
> - Simple! When the class get's a changeBoundsRequest, have it forward some
> - "move bendpoints request" to all of it's source connections (source
> - connections are the ones going out of the node). You can do this
> - conditionally only if the target node is also moving (see
> - ChangeBoundsRequest.getEditParts()). You could test for the condition
> - either on the connection, or at the time when you decide to forward to
> the
> - connection.
> I think I have done what is being suggested here. When a
> changeBoundsRequest is received by the node then it iterates through all
> the connections it is the source for and test to see if the target node is
> also being moved. If this is the case, then REQ_MOVE_BENDPOINT requests
> are constructed and the appropriate commands queued. This works, but the
> problem is that the new position is the new position of the node (set
> using request.setLocation(..)) not of the bendpoint.
> Any suggestion on how I can work out the bendpoints new position? Or
> alternatively a better way to implement this functionality?
> James
|
|
|
|
|
|
|
Re: REPOST: Marquee + bendpoint selection/move [message #145537 is a reply to message #145045] |
Thu, 29 July 2004 13:03  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
You only want to do this one time, not for every node being dragged. I
would suggest doing it in the drag tracker and extending getCommand to
include the move bendpoints contribution.
"James Willans" <jwillans@cs.york.ac.uk> wrote in message
news:ce954j$gu2$1@eclipse.org...
> Okay thanks. So how can I calculate which other nodes are being
> simultaneously being moved?
>
> James
>
> Randy Hudson wrote:
>
> > This is because each child individually receives the move request, and
> > forward it on to its parent for itself only. The plan was to change
this so
> > that the selection set was split up into individual sets of children
with
> > the same parent, and then ask each parent for the necessary commands.
But
> > no one has really required this so it hasn't happened. For
compatibility we
> > would probably have to make this an option on DragEditPartsTracker and
not
> > the default.
|
|
|
Powered by
FUDForum. Page generated in 0.24564 seconds