1
0
Fork 0

ArangoAdapter now creates a node Reducer

This commit is contained in:
Michael Hackstein 2013-05-17 14:39:35 +02:00
parent 6fac02a451
commit 0c4ef2215b
2 changed files with 5 additions and 1 deletions

View File

@ -54,6 +54,7 @@ function ArangoAdapter(nodes, edges, config) {
queries = {}, queries = {},
nodeCollection, nodeCollection,
edgeCollection, edgeCollection,
reducer,
arangodb, arangodb,
width, width,
height, height,
@ -369,6 +370,9 @@ function ArangoAdapter(nodes, edges, config) {
+ " || e._from == @id" + " || e._from == @id"
+ " RETURN e"; + " RETURN e";
reducer = new NodeReducer(nodes, edges);
self.oldLoadNodeFromTreeById = function(nodeId, callback) { self.oldLoadNodeFromTreeById = function(nodeId, callback) {
sendQuery(queries.nodeById, { sendQuery(queries.nodeById, {
id: nodeId id: nodeId

View File

@ -258,7 +258,7 @@
height: 40 height: 40
} }
); );
expect(window.NodeReducer).wasCalledWith({}); expect(window.NodeReducer).wasCalledWith(nodes, edges);
}); });
describe('setup correctly', function() { describe('setup correctly', function() {