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

The connections on the right are not displayed correctly. #442

Closed
pleshevskiy opened this issue Dec 13, 2022 · 3 comments · Fixed by #453
Closed

The connections on the right are not displayed correctly. #442

pleshevskiy opened this issue Dec 13, 2022 · 3 comments · Fixed by #453
Assignees
Labels
bug Something isn't working

Comments

@pleshevskiy
Copy link

# layout: elk

d2: D2 {
  description: |txt
    D2 is a modern diagram scripting
    language that turns text to diagrams. 
  |
}

d2 -> Comments
comments -> line_comment
comments -> block_comment

line_comment: Line Comment {
  example: |python
    x -> y
    # This is line comment
    y -> z # and this
  |
}

block_comment: Block Comment {
  example: |python
    x -> y
    """
    This is block comment
    """
    y -> z
  |
}

d2 -> $shape
$shape: Shape {
  syntax: |txt
    <shape_key>[: <label>][;]
  |
}

d2 -> container
container: Container {
  syntax: |%txt
    <container_key>[: <label>] {
      (<container_definition>)*
    }

    where
      container_definition:
        Shape | Connection | Attribute
  %|
}

d2 -> connection
connection: Connection {
  syntax: |%txt
    <shape_path> <arrow> <shape_path>[: <label>][connection_block]

    where
      arrow: -- | -> | <- | <->

      shape_path:
        (<container_key>.)*<shape_key>

      connection_block:
        { <connection_definition> }

      connection_definition:
        connection_attribute | style_attribute
  %|
}

d2 -> Text Block

Exected

image

Actual

image

@cyborg-ts cyborg-ts added this to D2 Dec 13, 2022
@pleshevskiy
Copy link
Author

Actually, dagre is affected too
image

@alixander alixander added the bug Something isn't working label Dec 13, 2022
@VenkataBhaskarr
Copy link

@pleshevskiy can you please mention the operating system you are working on, the browser and its version because it's working perfectly fine in my device(Mac OS Ventura , safari latest version).

Screenshot 2022-12-15 at 10 39 30 PM

@pleshevskiy
Copy link
Author

pleshevskiy commented Dec 15, 2022

@VenkataBhaskarr I don't think it matters. I had this code working fine up to a certain version. Unfortunately I missed the exact moment when it broke.
I have currently installed the latest version of d2 (rev: bf13973)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants