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

how to make shape: step for Dagre/ELK like in Tala #1585

Closed
italovieira opened this issue Sep 12, 2023 · 3 comments
Closed

how to make shape: step for Dagre/ELK like in Tala #1585

italovieira opened this issue Sep 12, 2023 · 3 comments

Comments

@italovieira
Copy link

italovieira commented Sep 12, 2023

Is there any way to make shape: step works like intended for Dagre and ELK as is in Tala?

Example in Dagre:
d2

Example in Tala:
d2

Code used

x -> y -> z
*.shape: step
@cyborg-ts cyborg-ts added this to D2 Sep 12, 2023
@alixander
Copy link
Collaborator

alixander commented Sep 13, 2023

unfortunately not. in your example, it works, but let's say you had

step1 -> step2

step*.shape: step

step1 -> a
step1 -> b
step2 -> b

Dagre and ELK place step1 and step2 in specific locations according to their graph algorithms. We cannot change their positions without layouts breaking.

Whereas in TALA we have full control:

Screen Shot 2023-09-12 at 11 54 52 PM

In general, if it can be done in the open-source options, we do.

@github-project-automation github-project-automation bot moved this to Done in D2 Sep 13, 2023
@bo-ku-ra
Copy link
Contributor

is this possible?
image

s: "" {
  style.opacity: 0
  grid-rows: 1
  grid-gap: 0
  x: {shape: step}
  y: {shape: step}
  z: {shape: step}
}

s -> a
s -> b
s -> b

@alixander
Copy link
Collaborator

Yeah something like that would work. In general, I think using grids in parts of the diagram will help hack a lot of these situations: #1586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants