Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ELK rectpacking causes error #422

Closed
Drakae opened this issue Jan 31, 2024 · 4 comments
Closed

ELK rectpacking causes error #422

Drakae opened this issue Jan 31, 2024 · 4 comments

Comments

@Drakae
Copy link

Drakae commented Jan 31, 2024

I want to use the rectpacking layout algorithm of ELK (using Sprotty version 0.13.0). However, when setting the property in the layout config I get the following error:
Failed to generate diagram: Error: org.eclipse.elk.core.UnsupportedConfigurationException: Layout algorithm 'rectpacking' not found

I tested the JSON of my graph in elklive as well as with an ELK CLI (both times the versions 0.8.2 and 0.9.0) and there it works just fine.
Example JSON:

{
    "id": "root",
    "layoutOptions": {
        "org.eclipse.elk.algorithm": "rectpacking"
    },
    "children": [
        {
            "id": "dummy",
            "children": [],
            "edges": [],
            "labels": [
                {
                    "id": "dummyLabel1_label",
                    "text": "dummy",
                    "x": 5,
                    "y": 5,
                    "width": 43.1181640625,
                    "height": 15
                }
            ],
            "ports": [],
            "width": 53.1181640625,
            "height": 25
        },
        {
            "id": "dummy2",
            "children": [],
            "edges": [],
            "labels": [
                {
                    "id": "dummyLabel2_label",
                    "text": "dummy",
                    "x": 5,
                    "y": 5,
                    "width": 43.1181640625,
                    "height": 15
                }
            ],
            "ports": [],
            "width": 53.1181640625,
            "height": 25
        }
    ],
    "edges": []
}
@spoenemann
Copy link
Contributor

How are you integrating ELK with Sprotty – elkjs, elk-server, sprotty-server, or something else?

@Drakae
Copy link
Author

Drakae commented Feb 12, 2024

I use sprotty-elk and elkjs.

@spoenemann
Copy link
Contributor

Ok then this issue should rather be discussed in the elkjs repo.

Just one hint: are you using the latest version of elkjs, and have you enabled the rectpacking algorithm in the API?

@Drakae
Copy link
Author

Drakae commented Feb 13, 2024

Thanks for the hint, I overlooked this.

@Drakae Drakae closed this as completed Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants