Skip to content

feat(dia.Element): port position args now provided inside position property #2931

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

Merged
merged 4 commits into from
Apr 24, 2025

Conversation

zbynekstara
Copy link
Contributor

Description

Currently, port position arguments are read from top-level args port property, which is inconsistent with port groups and port labels (they both read those from position.args property).

This PR aligns the three - port's position.args are the source of truth for port position arguments. (To keep backwards compatibility, if there are no position.args, args are checked second.) For example:

g1.addPort({
    position: {
        args: {
            dx: 20
        }
    },
    attrs: {
        circle: {
            magnet: true,
            stroke: '#31d0c6',
            'stroke-width': 2,
            fill: '#ffffff'
        }
    }
});

@zbynekstara zbynekstara requested a review from kumilingus April 11, 2025 13:53
@zbynekstara zbynekstara marked this pull request as draft April 22, 2025 13:01
@zbynekstara zbynekstara marked this pull request as ready for review April 24, 2025 14:29
@kumilingus kumilingus merged commit 05d5621 into clientIO:master Apr 24, 2025
3 checks passed
@kumilingus kumilingus changed the title feat(dia.ports): port position args now provided inside position property feat(dia.Element): port position args now provided inside position property Apr 24, 2025
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

Successfully merging this pull request may close these issues.

2 participants