mirror of https://gitee.com/bigwinds/arangodb
ArangoAdapter now creates a node Reducer
This commit is contained in:
parent
6fac02a451
commit
0c4ef2215b
|
@ -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
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue