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 02:01 Go to next message
Juliane Mueller is currently offline Juliane Mueller
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 09:09 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1590
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 07:01 Go to previous message
Juliane Mueller is currently offline Juliane Mueller
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:DefaultMarkerBehavior woes
Next Topic:Undoing direct editing leads to multiple undos
Goto Forum:
  


Current Time: Tue Sep 02 12:59:22 EDT 2014

Powered by FUDForum. Page generated in 0.01892 seconds