Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » IMoveShapeContext for the outer container
IMoveShapeContext for the outer container [message #1837243] Mon, 25 January 2021 22:48
Alex Kravets is currently offline Alex KravetsFriend
Messages: 554
Registered: November 2009
Senior Member
I have custom shape where one shape is embedded in another. (an image) When I move this shape I'd like to restrict ability to select main container and instead select inner shape. I currently implement DefaultToolBehaviorProvider.getSelection() method to select inner shape when outer is selected, but nothing user prevents from clicking on outer shape and moving it.

I added collision detection with other objects which works well when I move outer shape. However, when I click on the image and move it, the calculations happen in reference to the image shape and the detection doesn't work correctly - IMoveShapeContext is for the inner shape, not outer. What can I do to adapt IMoveShapeContext to outer shape? I tried getting outer shape based on certain properties and using Graphiti.getPeLayoutService().getLocationRelativeToDiagram() to get location of the shape, but this is not real time position of the object.

https://i.ibb.co/1997W8k/2021-01-21.jpg
Previous Topic:Problem with SVG
Goto Forum:
  


Current Time: Mon Apr 19 13:47:17 GMT 2021

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

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

Back to the top