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

added attributes to grammar #74

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

winfinit
Copy link

This feature will permit one to use attributes that raphael.js provides, which will allow us to modify how text looks and behaves.

extended syntax can look like this:

    Title: Sample Diagram[fontcolor="white", fillcolor="blue", color="red"]
    Participant Alice as A [color="red"]
    Participant Bob [fillcolor="blue", fontcolor="white"]
    A->Bob: Message [color="gray"]
    Note left of A: Hello color\nNotes [URL="http://example.com", fillcolor="orange"]
    Note right of Bob: Click Me\nI will take you\nto example.com [URL="http://example.com"]
    Note over A, Bob: Gradient colors [fillcolor="90-#f00:5-#00f:95"]

Sample generated UML diagram

release process instructions

adding correct min files based on standard make

foo

updated ebnf diagram
@winfinit
Copy link
Author

looking at this further, maybe it makes sense to sync attribute names more to graphviz attribute names instead of raphael.js, that way we can address issue #31 also (i.e. connector color, actor color, etc ...)?

graphviz aattributes (http://www.graphviz.org/doc/info/attrs.html)

@winfinit
Copy link
Author

i've committed new changes that will permit one to control colors of actors, actor strokes, signal colors, note, and font color via attribute names from graphviz

@winfinit winfinit mentioned this pull request Aug 27, 2014
@ComFreek
Copy link

👍

@riaan53
Copy link

riaan53 commented Jun 12, 2015

This looks fantastic! Any chance for a merge?

@Restuta
Copy link

Restuta commented Aug 5, 2015

@bramp are you going to merge this neat PR? @winfinit thanks for that.

@bramp
Copy link
Owner

bramp commented Aug 5, 2015

This is cool, but I avoided merging as it introduces a new syntax that I'm unsure about supporting in the future. For example, we currently use Raphael that generates VML in IE, and SVG elsewhere. I'd rather change to something like svg.io dropping old IE support. Then we can use the styling native to SVG.

@bramp bramp added this to the SVG Only milestone Aug 5, 2015
@raboof raboof mentioned this pull request Sep 3, 2015
@RoryBecker
Copy link

I'm very interested in this sort of functionality.

Might I observe that MS have dropped support for IE7, IE8 and IE10 (On all platforms) and IE9 (on anything other than Vista or Server 2008) as of today. Perhaps this helps pave the way for "Dropping old IE support"

@CaptainQuirk
Copy link

Hi there,

I would love to see this coming up in a future release.
If you plan on dropping vml support, you could start by preventing your lib to work if launched in IE lte 9. It would allow this feature to be integrated while you get to replace the rendering engine.

Thanks in advance !

@Chetabahana
Copy link

Chetabahana commented May 6, 2018

If no merge possible to see this coming up in a future release, I assume the only solution is through css attribut like onclick event..

@zou79189747
Copy link

hi, I did the same thing as you did, but the effect didn't appear. Sequence_diagrams didn't support it.Can you list the complete code?
my code:

<script src="js/lib/sequence_diagrams/webfont.js"></script> <script src="js/lib/sequence_diagrams/snap.svg-min.js"></script> <script src="js/lib/sequence_diagrams/underscore-min.js"></script> <script src="js/lib/sequence_diagrams/sequence-diagram-min.js"></script>
<script> var diagram = Diagram.parse("Title: Sample Diagram[fontcolor=\"white\", fillcolor=\"blue\", color=\"red\"]\n" + "Participant Alice as A [color=\"red\"]\n" + "Participant Bob [fillcolor=\"blue\", fontcolor=\"white\"]\n" + "A->Bob: Message [color=\"gray\"]\n" + "Note left of A: Hello color\\nNotes [URL=\"http://example.com\", fillcolor=\"orange\"]\n" + "Note right of Bob: Click Me\\nI will take you\\nto example.com [URL=\"http://example.com\"]\n" + "Note over A, Bob: Gradient colors [fillcolor=\"90-#f00:5-#00f:95\"]"); diagram.drawSVG("diagram", {theme: 'simple'}); </script>

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

Successfully merging this pull request may close these issues.

9 participants