Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » MoveAnchorFeature - only vertically/horizontally(move should be just allowed for a vertical/horizontal movements)
MoveAnchorFeature - only vertically/horizontally [message #1368443] Tue, 20 May 2014 06:01 Go to next message
Juliane Mueller is currently offline Juliane MuellerFriend
Messages: 30
Registered: August 2011
Member
Hello,

like the description said I want to modify the canMoveAnchor method in the way only vertical/horizontal movements are allowed.

I've seen that the moveShapeContext has a deltaX and deltaY in it. With this two numbers it would be very easy to allow the movement or not.
Is there any possibility to get the delte from the IMoveAnchorContext?

Thanks for your reply!
Re: MoveAnchorFeature - only vertically/horizontally [message #1374075 is a reply to message #1368443] Thu, 22 May 2014 13:09 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Juliane,

unfortunately not. This is only implemented for shapes, not for anchors. You
could calculate the position of the anchor and calculate the delta yourself
as workaround.

I think that information would make sense to provide within the context for
anchors as well. Would you file that as an enhancement request?

Thanks,
Michael
Re: MoveAnchorFeature - only vertically/horizontally [message #1384821 is a reply to message #1374075] Mon, 02 June 2014 11:01 Go to previous message
Juliane Mueller is currently offline Juliane MuellerFriend
Messages: 30
Registered: August 2011
Member
Where shall I file that?
I've found a solution for my Problem:
if (anchor.getLocation().getX() == context.getX())

This checks the right Location.

Thanks for your answer Michael
Previous Topic:How to set Icon for Features (other than custom features) on the diagram context menu
Next Topic:Undoing direct editing leads to multiple undos
Goto Forum:
  


Current Time: Fri Apr 19 22:47:27 GMT 2024

Powered by FUDForum. Page generated in 0.02951 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top