-
Notifications
You must be signed in to change notification settings - Fork 519
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
Feature: make animated connections w/o dashed lines have icons #1949
Comments
I think #12 is a pre-req to this. Once connections have icons, |
Sorry, a bit confused about what #12 is asking for. Does it mean add the ability for D2 to add an icon along a path? For example, there would be some style such that you could put a circle at any point along the path? |
@alixander |
Yeah I know a label can do that, but I think it'd be common for users to want a label AND an icon while animating. So I don't want to animate the label |
yes, so as follows x -> y: {
label: "real label"
style.animated: true;
style.animation-label: "●"
} |
Why introduce a new keyword? Adding a third keyword here means you expect someone to have a label, icon, AND an animated text. That's bloated |
if i can use a charactor, i don't need any files other than the d2 source file. |
Ok, just before I start to tackle the issue, just want to make sure everything is in-line with your thinking. Ignoring animation for now, to close issue #12, I need to implement a way to add an icon to a path. The label can't clash with the icon, so either I have to move the label "up" along the path and put the icon below it or put the label adjacent to the path and have only the icon on the path. Which were you thinking? I'll start on fixing the issue. |
@danielsuh05 Yes, you just have to specify the position, the renderer already has logic to move labels to their predefined position. Although I do think it's a little too involved, hence not giving it a good first issue tag. You're welcome to try anyway if you're hearing it call your name =), but I'd suggest something with the good-first-issue tag (https://github.com/terrastruct/d2/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22), maybe something that touches the compiler, e.g. |
@bo-ku-ra You do have a point that animating some text might be what people want instead of icon. Maybe |
Got this from looking at issue #1461.
Just some brainstorming, what would the syntax look like? Putting
animated: true
makes the line dashed automatically, so how would we differentiate whether the user wants a dashed line or a line with a moving icon? I'd like to take this issue if possible as well.The text was updated successfully, but these errors were encountered: