Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to control size of drawing canvas(How to control size of drawing canvas)
How to control size of drawing canvas [message #1817017] Thu, 14 November 2019 05:55 Go to next message
Mohit Advani is currently offline Mohit AdvaniFriend
Messages: 13
Registered: May 2019
Junior Member
Hi,
I am trying to control size of sirius drawing canvas, it seems the size of the Sirius diagram depends on the position of the element on the bottom-right corner of the diagram, but once diagram is full and user tries to resize, first user needs to put a node at bottom right corner and then drag again to resize diagram which does not look good during the demos.
Can someone please let me know how can we add a listener and change size of drawing canvas so that it automatically resize based on some event.

Thanks in Advance
Mohit Advani
Re: How to control size of drawing canvas [message #1817028 is a reply to message #1817017] Thu, 14 November 2019 09:45 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 476
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Mohit,

You might try to a some kind of anchor node :
- node mapping with the same domain class than the diagram and aql:self as semantic candidates expression
- with a specific style and a small size.

Then you might add a ModelChangeTrigger or a pre-commit listener to react to changes on diagrams at the GMF level. I would try to detect the add/move/resize of GMF views (LayoutConstraint/Bounds/Size) elements and if needed retrieve and update the location of the anchor node to automatically move it in order to resize the diagram.

Regards


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Re: How to control size of drawing canvas [message #1817076 is a reply to message #1817028] Fri, 15 November 2019 07:25 Go to previous message
Mohit Advani is currently offline Mohit AdvaniFriend
Messages: 13
Registered: May 2019
Junior Member
Hi Maxime,

Thanks for your quick reply, how can i get GMF object from my diagram object , is there any direct methods to change at GMF level or any configuration changes i need for GMF related changes?

Thanks and Regards
Mohit Advani


Previous Topic:Get selected item value in capella diagram
Next Topic:Unable to create working Element based edge
Goto Forum:
  


Current Time: Fri Feb 21 07:33:16 GMT 2020

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

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

Back to the top