1
0
Fork 0

GraphViewer: Fixes in NodeShaper

This commit is contained in:
Michael Hackstein 2013-05-02 14:39:36 +02:00
parent c031fe4e84
commit 958c507943
3 changed files with 20 additions and 2 deletions

View File

@ -171,7 +171,7 @@ function NodeShaper(parent, flags, idfunc) {
addShape = noop;
break;
case NodeShaper.shapes.CIRCLE:
radius = shape.radius || 8;
radius = shape.radius || 25;
addShape = function (node) {
node.append("circle") // Display nodes as circles
.attr("r", radius); // Set radius

View File

@ -324,6 +324,24 @@
});
it('should load the graph on pressing enter', function() {
runs(function() {
$("#contentDiv #menubar #value").attr("value", "0");
var e = jQuery.Event("keypress");
e.which = 13;
e.keyCode = 13;
$("body").trigger(e);
});
waits(waittime);
runs(function() {
expect([0, 1, 2, 3, 4]).toBeDisplayed();
});
});
it('should load the graph by attribute and value', function() {
runs(function() {

View File

@ -128,7 +128,7 @@
expect($("svg circle").length).toEqual(1);
expect($("svg .node circle")[0]).toBeDefined();
expect($("svg .node circle").length).toEqual(1);
expect($("svg #1 circle")[0].attributes.r.value).toEqual("8");
expect($("svg #1 circle")[0].attributes.r.value).toEqual("25");
});
describe('testing for colours', function() {