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

element definition location in priority #6285

Open
SailorMax opened this issue Feb 15, 2025 · 0 comments
Open

element definition location in priority #6285

SailorMax opened this issue Feb 15, 2025 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@SailorMax
Copy link

Proposal

Detect element definition (without connections) and use it's location as priority to use as parent subgraph.

Currently mermaid output element in subgraph where it used first time. But sometime it has to be in another.

Example

flowchart LR;

    subgraph current version - b in 1.1 but we need in 1.2
        direction LR;
        subgraph 1.1
            a-->b
        end

        subgraph 1.2
            b-->c
        end
    end


    subgraph manual fix - to put bb in 2.2 we have to move 2.2 before 2.1
        direction LR;
        subgraph 2.2
            bb-->cc
        end

        subgraph 2.1
            aa-->bb
        end
    end

    subgraph suggest defintions - bbb has to be in 3.2
        direction LR;
        subgraph 3.1
            aaa-->bbb
        end

        subgraph 3.2
            %% define bbb here to output it in current subgraph
            bbb
            bbb-->ccc
        end
    end

Screenshots

Image

@SailorMax SailorMax added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant