mirror of https://gitee.com/bigwinds/arangodb
GraphViewer: Fixes in NodeShaper
This commit is contained in:
parent
c031fe4e84
commit
958c507943
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue