* 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:
parent
6988dea353
commit
9aeff6be2d
|
@ -234,7 +234,10 @@ A---|This is the text|B;
|
||||||
![Text on links](http://www.sveido.com/mermaid/img/ex11.png)
|
![Text on links](http://www.sveido.com/mermaid/img/ex11.png)
|
||||||
|
|
||||||
### Styling links
|
### 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;
|
linkStyle 3 stroke:#ff3,stroke-width:4px;
|
||||||
|
|
|
@ -13163,7 +13163,7 @@ exports.addEdges = function (edges, g) {
|
||||||
aHead = 'none';
|
aHead = 'none';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
aHead = 'vee';
|
aHead = 'normal';
|
||||||
}
|
}
|
||||||
|
|
||||||
var style = '';
|
var style = '';
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13131,7 +13131,7 @@ exports.addEdges = function (edges, g) {
|
||||||
aHead = 'none';
|
aHead = 'none';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
aHead = 'vee';
|
aHead = 'normal';
|
||||||
}
|
}
|
||||||
|
|
||||||
var style = '';
|
var style = '';
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11,7 +11,7 @@
|
||||||
"url": "https://github.com/knsv/mermaid"
|
"url": "https://github.com/knsv/mermaid"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "BSD-2-Clause",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"he": "^0.5.0",
|
"he": "^0.5.0",
|
||||||
"dagre-d3": "~0.3.2"
|
"dagre-d3": "~0.3.2"
|
||||||
|
|
|
@ -103,7 +103,7 @@ exports.addEdges = function (edges, g) {
|
||||||
aHead = 'none';
|
aHead = 'none';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
aHead = 'vee';
|
aHead = 'normal';
|
||||||
}
|
}
|
||||||
|
|
||||||
var style = '';
|
var style = '';
|
||||||
|
|
|
@ -68,7 +68,7 @@ describe('when using main and ',function() {
|
||||||
setEdge:function(start, end,options,name){
|
setEdge:function(start, end,options,name){
|
||||||
expect(start).toBe('A');
|
expect(start).toBe('A');
|
||||||
expect(end).toBe('B');
|
expect(end).toBe('B');
|
||||||
expect(options.arrowhead).toBe('vee');
|
expect(options.arrowhead).toBe('normal');
|
||||||
expect(options.label.match('text ex')).toBeTruthy();
|
expect(options.label.match('text ex')).toBeTruthy();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -85,7 +85,7 @@ describe('when using main and ',function() {
|
||||||
setEdge:function(start, end,options,name){
|
setEdge:function(start, end,options,name){
|
||||||
expect(start).toBe('A');
|
expect(start).toBe('A');
|
||||||
expect(end).toBe('B');
|
expect(end).toBe('B');
|
||||||
expect(options.arrowhead).toBe('vee');
|
expect(options.arrowhead).toBe('normal');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue