* Changed the license in package json to the correct license (MIT).

* Changed the link style from the pointed one to a more triangle formed style as default style for links
* Updated the readme file regarding linkStyles to explain the magic number 3a s described in issue #41
This commit is contained in:
knsv 2014-12-09 20:42:31 +01:00
parent 6988dea353
commit 9aeff6be2d
8 changed files with 12 additions and 9 deletions

View File

@ -234,7 +234,10 @@ A---|This is the text|B;
![Text on links](http://www.sveido.com/mermaid/img/ex11.png)
### Styling links
It is possible to style links for instance a link that is going back in the flow. This is done by the linkStyle statement as in the example below:
It is possible to style links, for instance you might want to style a link that is going backwards in the flow. As links
has no ids in the same way as nodes, some other way of deciding what link the style should be attached to is required.
Instead of ids the order number of when the link was defined in the graph is used. In the example below the style
defined in the linkStyle statement will belong to the forth link in the graph:
```
linkStyle 3 stroke:#ff3,stroke-width:4px;

View File

@ -13163,7 +13163,7 @@ exports.addEdges = function (edges, g) {
aHead = 'none';
}
else{
aHead = 'vee';
aHead = 'normal';
}
var style = '';

File diff suppressed because one or more lines are too long

View File

@ -13131,7 +13131,7 @@ exports.addEdges = function (edges, g) {
aHead = 'none';
}
else{
aHead = 'vee';
aHead = 'normal';
}
var style = '';

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@
"url": "https://github.com/knsv/mermaid"
},
"author": "",
"license": "BSD-2-Clause",
"license": "MIT",
"dependencies": {
"he": "^0.5.0",
"dagre-d3": "~0.3.2"

View File

@ -103,7 +103,7 @@ exports.addEdges = function (edges, g) {
aHead = 'none';
}
else{
aHead = 'vee';
aHead = 'normal';
}
var style = '';

View File

@ -68,7 +68,7 @@ describe('when using main and ',function() {
setEdge:function(start, end,options,name){
expect(start).toBe('A');
expect(end).toBe('B');
expect(options.arrowhead).toBe('vee');
expect(options.arrowhead).toBe('normal');
expect(options.label.match('text ex')).toBeTruthy();
}
};
@ -85,7 +85,7 @@ describe('when using main and ',function() {
setEdge:function(start, end,options,name){
expect(start).toBe('A');
expect(end).toBe('B');
expect(options.arrowhead).toBe('vee');
expect(options.arrowhead).toBe('normal');
}
};