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

Change Layout direction in cluster with connections #969

Open
simhem opened this issue Feb 15, 2024 · 1 comment
Open

Change Layout direction in cluster with connections #969

simhem opened this issue Feb 15, 2024 · 1 comment

Comments

@simhem
Copy link

simhem commented Feb 15, 2024

Is it possible to get a diagram in one direction and a cluster with connections inside in another direction, for example if i do the following it works fine

with Diagram("Cloud architecture", show=False, direction="TB"):

    rds = RDS("RDS")

    with Cluster('api', direction="LR"):
        lambdaCheck = LambdaFunction("tCheck")
        apiGatewayEndpoit = APIGatewayEndpoint("API") 
        [apiGatewayEndpoit, lambdaCheck] 
        lambdaCheck >> rds

    lambdaPlate = LambdaFunction("Send")

    ELB("lb") >> apiGatewayEndpoit >> lambdaPlate >> Edge(forward=True, reverse=True) >> rds

That gives me this
image

Which would be perfect with and arrow between the API Gateway and the Lambda function

But if i add a connection in the api Cluster like this

with Diagram("Cloud architecture", show=False, direction="TB"):

    rds = RDS("RDS")

    with Cluster('api', direction="LR"):
        lambdaCheck = LambdaFunction("tCheck")
        apiGatewayEndpoit = APIGatewayEndpoint("API") 
        apiGatewayEndpoit >> lambdaCheck 
        lambdaCheck >> rds

    lambdaPlate = LambdaFunction("Send")

    ELB("lb") >> apiGatewayEndpoit >> lambdaPlate >> Edge(forward=True, reverse=True) >> rds

It does not take the direction into account, i would need the arrow in the LR direction
image

@amitai52
Copy link

From what I tried my conclusion was that although the Cluster does accept direction -- it ignores it.
For my use, I'd really like the option to be able to set that from the source code.
Thanks!

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