1
0
Fork 0

Fixed Node shaper, if no shape is given nodes are not shaped, if an unknown shape is given an error is thrown

This commit is contained in:
Michael Hackstein 2013-03-15 14:34:33 +01:00
parent 03661e765c
commit 8d291b29c1
2 changed files with 4 additions and 4 deletions

View File

@ -109,6 +109,8 @@ function NodeShaper(parent, flags, idfunc) {
.attr("height", height); // Set height
});
break;
case undefined:
break;
default:
throw "Sorry given Shape not known!";
}

View File

@ -246,8 +246,7 @@
beforeEach(function () {
shaper = new NodeShaper(d3.select("svg"), {
"label": "label",
"shape": NodeShaper.shapes.CIRCLE
"label": "label"
});
});
@ -304,8 +303,7 @@
beforeEach(function () {
shaper = new NodeShaper(d3.select("svg"), {
"label": labelFunction,
"shape": NodeShaper.shapes.CIRCLE
"label": labelFunction
});
});