-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[classDef] Suggestion: extend classDef with default shape #1255
Comments
It sounds like you are looking for the class statement:
With it you can apply a class to a list of nodes as in the example above. |
Being able to specify shape in classDef would be really helpful – it would allow specifying semantic classes of nodes and styling them separately. This would be very useful when aiming for a consistent "language" across multiple diagrams. |
I have not given this much thought by now, but this could be done by adding a new attribute |
IMO words would be a little bit more readable in this context. |
Just like that, but with a separator: |
As long as we dont use the That is the problem I have been running into with setting up style support |
I think using |
The only drawing program I used (POVRay) also used comma's in their shape definition. Comma separation seems to make sense to me ! |
Please disregard all of my comments above. As I was laying down to go to sleep last might I realized that this is all talking about css class definition for flowcharts... and not the css class definition for Class Diagrams, which is what I had read it as :) |
Still could be useful to sync up anyways :) |
On second thought, I think we should implement this only as an option for the |
Hmmm... how is And from the user's perspective, if it's only available for style t's possible to have one default shape, but it's impossible to define a few kinds of nodes with their shape, color etc. Let's say someone wants to have red Redis databases, blue Postgres databases and yellow circles for web servers in their diagram. It would be nice if they could declare these 3 kinds of nodes somehow and use them semantically |
FYI: |
Hi everyone, I'm facing the exact same issue reported by @mvandermade 4 years ago. This ticket describes pretty well my need. Be able to assign a shape via a class The ticket is pretty old. I'm curious if there were improvements in the syntax in the last years. I've read the documentation and I found nothing about it. Did I miss something? Thanks |
I agree; having a way to apply a semantic class name to each node, and then have the styling done separately in a classDef, would be really nice. To me, the shape is part of the UI, vs. the underlying structure; the class is part of the structure of the diagram, but, especially in a flowchart where things can get pretty abstract, wanting to change leaf nodes from a rectangle to a circle feels like styling to me. |
i would like to use |
Is your feature request related to a problem? Please describe.
I'm frustrated when I use a class (for example ":::redis" which gives it a red colour) I need to manually shape each node. Example:
Describe the solution you'd like
To simplify using a syntax where the classDef also contains the shape
Describe alternatives you've considered
Copy paste a lot
Additional context
to:
The text was updated successfully, but these errors were encountered: