Bug 569254 - [ELK] Avoid overlap during arrange at opening
Summary: [ELK] Avoid overlap during arrange at opening
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2020-11-27 11:25 EST by Laurent Redor CLA
Modified: 2021-05-05 09:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2020-11-27 11:25:44 EST
Currently, in Sirius 6.4.0, the arrange at opening ignores other elements. It is expected to have possible overlap with other existing nodes.
We could imagine to do the current layout and then to add a shifting "after" the bounding box of existing brothers. This shifting could be done to the right or to the bottom, or even to the left or the top. These 2 last options seems less natural. Maybe the "direction" of the shifting should be configurable.

Steps to reproduce:
* Create a modeling project with data from "gitSiriusRepo\org.eclipse.sirius\plugins\org.eclipse.sirius.tests.junit\data\unit\layout\withELK"
* Open the diagram "diagramWithContainer" of "packageForArrangeSelectionTest"
* Launch an arrange all
* Save
* Close the diagram
* Replace the My.ecore file with the file contained in "gitSiriusRepo\org.eclipse.sirius\plugins\org.eclipse.sirius.tests.junit\data\unit\layout\withELK\replace"
* Open the diagram "diagramWithContainer"
* Expected: No overlap between new elements and existing ones: KO
    * New classes "Class1_3", "Class1_4" and "Class1_5" should be added "after" the bounding box of "Class1_1" and "Class1_2". The package "p1" should be resize accordingly.
    * New class "Class2_2_3" should be added "after" the bounding box of "Class2_2_1" and "Class2_2_2". The package "p2_2" should be resize accordingly.
    * New classes "Class3_5" and "Class3_6" should be added "after" the bounding box of "Class3_1" to "Class3_4". The package "p3" should be resize accordingly.
	* Overlap between existing elements themselves is expected. They are not "new" so they are not supposed to be moved during an arrange at opening. This is the case for:
	    * package "p1" and package "p2"
	    * package "p2_2" and class "Class2_1"
	    * package "p3" and package "p4"