Release 0.2.5

* Support for new shapes circle,  irregular rectangle
* Support for styling of links
* Support for newlines in texts
* Centered text on links
* Shaded background for text on links
* Support for click on nodes
This commit is contained in:
knsv 2014-11-27 21:28:04 +01:00
parent 18be0e02aa
commit 9a35844731
8 changed files with 21 additions and 21 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "mermaid", "name": "mermaid",
"version": "0.2.4", "version": "0.2.5",
"authors": [ "authors": [
"knsv <knut@sveido.com>" "knsv <knut@sveido.com>"
], ],

10
dist/mermaid.full.js vendored
View File

@ -684,7 +684,7 @@ var addVertices = function (vert, g) {
} }
return styleStr; return styleStr;
} };
// Iterate through each item in the vertice object (containing all the vertices found) in the graph definition // Iterate through each item in the vertice object (containing all the vertices found) in the graph definition
keys.forEach(function (id) { keys.forEach(function (id) {
@ -754,6 +754,7 @@ var addVertices = function (vert, g) {
*/ */
var addEdges = function (edges, g) { var addEdges = function (edges, g) {
var cnt=0; var cnt=0;
var aHead;
edges.forEach(function (edge) { edges.forEach(function (edge) {
cnt++; cnt++;
@ -954,7 +955,7 @@ var init = function () {
} }
} }
;
}; };
/** /**
@ -962,8 +963,8 @@ var init = function () {
* @returns {string} * @returns {string}
*/ */
exports.version = function(){ exports.version = function(){
return '0.2.4'; return '0.2.5';
} };
var equals = function (val, variable){ var equals = function (val, variable){
if(typeof variable === 'undefined'){ if(typeof variable === 'undefined'){
@ -1065,7 +1066,6 @@ exports.addLink = function (start, end, type, linktext) {
* @param style * @param style
*/ */
exports.updateLink = function (pos, style) { exports.updateLink = function (pos, style) {
console.log('Updating '+pos+'link:'+style);
var position = pos.substr(1); var position = pos.substr(1);
edges[pos].style = style; edges[pos].style = style;
}; };

File diff suppressed because one or more lines are too long

10
dist/mermaid.slim.js vendored
View File

@ -652,7 +652,7 @@ var addVertices = function (vert, g) {
} }
return styleStr; return styleStr;
} };
// Iterate through each item in the vertice object (containing all the vertices found) in the graph definition // Iterate through each item in the vertice object (containing all the vertices found) in the graph definition
keys.forEach(function (id) { keys.forEach(function (id) {
@ -722,6 +722,7 @@ var addVertices = function (vert, g) {
*/ */
var addEdges = function (edges, g) { var addEdges = function (edges, g) {
var cnt=0; var cnt=0;
var aHead;
edges.forEach(function (edge) { edges.forEach(function (edge) {
cnt++; cnt++;
@ -922,7 +923,7 @@ var init = function () {
} }
} }
;
}; };
/** /**
@ -930,8 +931,8 @@ var init = function () {
* @returns {string} * @returns {string}
*/ */
exports.version = function(){ exports.version = function(){
return '0.2.4'; return '0.2.5';
} };
var equals = function (val, variable){ var equals = function (val, variable){
if(typeof variable === 'undefined'){ if(typeof variable === 'undefined'){
@ -1033,7 +1034,6 @@ exports.addLink = function (start, end, type, linktext) {
* @param style * @param style
*/ */
exports.updateLink = function (pos, style) { exports.updateLink = function (pos, style) {
console.log('Updating '+pos+'link:'+style);
var position = pos.substr(1); var position = pos.substr(1);
edges[pos].style = style; edges[pos].style = style;
}; };

File diff suppressed because one or more lines are too long

View File

@ -62,7 +62,6 @@ exports.addLink = function (start, end, type, linktext) {
* @param style * @param style
*/ */
exports.updateLink = function (pos, style) { exports.updateLink = function (pos, style) {
console.log('Updating '+pos+'link:'+style);
var position = pos.substr(1); var position = pos.substr(1);
edges[pos].style = style; edges[pos].style = style;
}; };

View File

@ -22,7 +22,7 @@ var addVertices = function (vert, g) {
} }
return styleStr; return styleStr;
} };
// Iterate through each item in the vertice object (containing all the vertices found) in the graph definition // Iterate through each item in the vertice object (containing all the vertices found) in the graph definition
keys.forEach(function (id) { keys.forEach(function (id) {
@ -92,6 +92,7 @@ var addVertices = function (vert, g) {
*/ */
var addEdges = function (edges, g) { var addEdges = function (edges, g) {
var cnt=0; var cnt=0;
var aHead;
edges.forEach(function (edge) { edges.forEach(function (edge) {
cnt++; cnt++;
@ -292,7 +293,7 @@ var init = function () {
} }
} }
;
}; };
/** /**
@ -300,8 +301,8 @@ var init = function () {
* @returns {string} * @returns {string}
*/ */
exports.version = function(){ exports.version = function(){
return '0.2.4'; return '0.2.5';
} };
var equals = function (val, variable){ var equals = function (val, variable){
if(typeof variable === 'undefined'){ if(typeof variable === 'undefined'){

View File

@ -22,7 +22,7 @@ describe('when detecting chart type ',function() {
div = document.createElement('div'); div = document.createElement('div');
mermaid_config ={startOnLoad : false}; mermaid_config ={startOnLoad : false};
main = rewire('./main'); main = rewire('./main');
expect(main.version()).toBe('0.2.4'); expect(main.version()).toBe('0.2.5');
}); });
it('should not call start anything with an empty document', function () { it('should not call start anything with an empty document', function () {