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

specify direction per connection #35

Open
alixander opened this issue Feb 25, 2023 · 1 comment
Open

specify direction per connection #35

alixander opened this issue Feb 25, 2023 · 1 comment

Comments

@alixander
Copy link
Contributor

          Here a variation on this problem. There is probably no way to decide algorythmically whether the photosynthesis box should be on top or on the side of the nitrogen fixation box (except that this solution would use less space).  When I was thinking of a layout grammar (for another project), I though of having syntax along the following lines:

Ocean.Surface.Nitrogen Fixation -> Ocean.Surface.Photosynthesis: NH4: right

i.e. each connection would have an optional direction keyword. Is that a feature that could be considered in the future?

direction: up

# Atmosphere -> Ocean.Surface.Nitrogen Fixation: N2
Ocean.Surface.Nitrogen Fixation -> Ocean.Surface.Photosynthesis: NH4

Ocean.Surface.Photosynthesis -> Ocean.Deep.Nitrification: Org. N
Ocean.Deep.Nitrification -> Ocean.Deep.Denitrification/Anammox: NH3
# Ocean.Deep.Denitrification/Anammox -> Atmosphere: N2
Ocean.Deep.Nitrification -> Ocean.Surface.Photosynthesis: NH3

Originally posted by @uliw in #32 (comment)

@uliw
Copy link

uliw commented Feb 25, 2023

I played a bit with the new position keywords, which are really helpful. Looking at this graph

https://play.d2lang.com/?script=jJLBaoQwEIbv8xTzArW2aS-hFAQpPcVCnyDIqDmYSJIFl2XffcmysEGN8Sb4_fP__2QqPxo3DWQJv16-8f9kO9kSNi1JXQjlrelJ44-aZXgYjuIdMgyuxvwNxht31n4gpxxH8fsBe0SYUBNNkYPqVPtI0Ni-QAEpYCGuScd_Xystx9HMIQSDPLcus72TvTS5ZTA4EITjBRC9mTiWgBiONHxdIWm9qWDlXZOtlDLb73LQMALfymSbiGKfC-p5tcmotwAAAP__&layout=tala&sketch=0&

From a design view, would it be difficult to have an option to render boxes that share a hirarchy to be of equal dimension? I.e., the outer boxes would be off equal size, and thus appear much more harmonious and aligned with each other.

I haven't thought this through, but probably something like a size_ref: keyword so 'Atmospherecould referencesurface ocean. If set to group` it would use the size of the largest box in a given hirarchy

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