added attributes to grammar
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"]
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)
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
:+1:
This looks fantastic! Any chance for a merge?
@bramp are you going to merge this neat PR? @winfinit thanks for that.
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.
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"
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 !
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..
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: