Bug 540186 - [ELK] Edge labels not layouted correctly with ELK layered
Summary: [ELK] Edge labels not layouted correctly with ELK layered
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 5.0.0   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-10-16 11:07 EDT by Pierre Guilet CLA
Modified: 2019-11-27 06:13 EST (History)
2 users (show)

See Also:


Attachments
project to reproduce (87.46 KB, application/x-zip-compressed)
2018-10-16 11:07 EDT, Pierre Guilet CLA
no flags Details
problem screenshot (69.42 KB, image/png)
2018-10-16 11:08 EDT, Pierre Guilet CLA
no flags Details
pure elk result (337.01 KB, image/gif)
2018-10-16 11:11 EDT, Pierre Guilet CLA
no flags Details
DifferenceSiriusVsELK.png (19.22 KB, image/png)
2019-10-31 04:02 EDT, Laurent Redor CLA
no flags Details
ElkTests-basicfamily-mmAndModeler.zip (423.74 KB, application/x-zip-compressed)
2019-11-27 06:13 EST, Laurent Redor CLA
no flags Details
ElkTests-basicfamily-sample.zip (8.13 KB, application/x-zip-compressed)
2019-11-27 06:13 EST, Laurent Redor CLA
no flags Details
ElkExpectedResult.png (11.52 KB, image/png)
2019-11-27 06:13 EST, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Guilet CLA 2018-10-16 11:07:45 EDT
Created attachment 276265 [details]
project to reproduce

The layouting produced by ELK layered on a diagrame with start and end labels for edges is not correct. Labels are overlapping with each other and nodes with SVG image at least.

Steps to reproduce:

1-import the model and design project and launch a runtime.
2-import the sample project in runtime and open the representation
3- Click on arrange all

KO edge labels are overlapping.
Comment 1 Pierre Guilet CLA 2018-10-16 11:08:10 EDT
Created attachment 276266 [details]
problem screenshot
Comment 2 Pierre Guilet CLA 2018-10-16 11:11:25 EDT
Created attachment 276267 [details]
pure elk result

Add a screenshot of the layouting done by ELK without the SIrius integration
Comment 3 Pierre Guilet CLA 2018-11-27 04:03:10 EST
See https://www.eclipse.org/forums/index.php/mv/msg/1095588/1796388/#msg_1796388 for reported case
Comment 4 Laurent Redor CLA 2019-10-31 04:02:42 EDT
Created attachment 280476 [details]
DifferenceSiriusVsELK.png

I analyzed this problem. The cause of this problem is that in Sirius the edges do not stop on the bounding box of the image (red rectangle in the image DifferenceSiriusVsELK.png). Each edge goes until the border of the image instead of the bounding box (thanks to bug 452294). So the length of the edge is longer in Sirius than in ELK. And the label location is relative to an anchor Point that is computed according to the length of the edge. So the edge labels are wrongly located.
This specific aspect, this specific transformation, is, for the moment, not considered when we apply the ELK layout into Sirius.
Comment 5 Laurent Redor CLA 2019-11-27 06:12:48 EST
Here is another case corresponding to edge layout problem.

Steps to reproduce
* Import projects from ElkTests-basicfamily-mmAndModeler.zip in your workspace
* Launch a runtime
* Import project from ElkTests-basicfamily-sample.zip in your runtime
* Open diagram "new Persons diagram with ELK"
* Launch "arrange all" action from tabbar
* The expected result is something like "ElkExpectedResult.png". KO: The edge don't correspond to what is expected. It would be better if only the last segment is increased to target the real figure bounding box.
Comment 6 Laurent Redor CLA 2019-11-27 06:13:09 EST
Created attachment 280796 [details]
ElkTests-basicfamily-mmAndModeler.zip
Comment 7 Laurent Redor CLA 2019-11-27 06:13:25 EST
Created attachment 280797 [details]
ElkTests-basicfamily-sample.zip
Comment 8 Laurent Redor CLA 2019-11-27 06:13:58 EST
Created attachment 280798 [details]
ElkExpectedResult.png