mirror of https://gitee.com/bigwinds/arangodb
GraphViewer fixed a bug where a broken node was returned if no matching node could be found
This commit is contained in:
parent
2428afddd2
commit
b0cf923110
|
@ -256,6 +256,19 @@ function ArangoAdapter(nodes, edges, config) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
insertInitialCallback = function(callback) {
|
||||||
|
return function (n) {
|
||||||
|
if (n && n.errorCode) {
|
||||||
|
callback(n);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback(absAdapter.insertInitialNode(n));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
permanentlyRemoveEdgesOfNode = function (nodeId) {
|
permanentlyRemoveEdgesOfNode = function (nodeId) {
|
||||||
sendQuery(queries.connectedEdges, {
|
sendQuery(queries.connectedEdges, {
|
||||||
id: nodeId
|
id: nodeId
|
||||||
|
@ -352,10 +365,7 @@ function ArangoAdapter(nodes, edges, config) {
|
||||||
|
|
||||||
self.loadInitialNode = function(nodeId, callback) {
|
self.loadInitialNode = function(nodeId, callback) {
|
||||||
absAdapter.cleanUp();
|
absAdapter.cleanUp();
|
||||||
var cb = function(n) {
|
self.loadNode(nodeId, insertInitialCallback(callback));
|
||||||
callback(absAdapter.insertInitialNode(n));
|
|
||||||
};
|
|
||||||
self.loadNode(nodeId, cb);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.loadNodeFromTreeById = function(nodeId, callback) {
|
self.loadNodeFromTreeById = function(nodeId, callback) {
|
||||||
|
@ -376,10 +386,7 @@ function ArangoAdapter(nodes, edges, config) {
|
||||||
|
|
||||||
self.loadInitialNodeByAttributeValue = function(attribute, value, callback) {
|
self.loadInitialNodeByAttributeValue = function(attribute, value, callback) {
|
||||||
absAdapter.cleanUp();
|
absAdapter.cleanUp();
|
||||||
var cb = function(n) {
|
self.loadNodeFromTreeByAttributeValue(attribute, value, insertInitialCallback(callback));
|
||||||
callback(absAdapter.insertInitialNode(n));
|
|
||||||
};
|
|
||||||
self.loadNodeFromTreeByAttributeValue(attribute, value, cb);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.requestCentralityChildren = function(nodeId, callback) {
|
self.requestCentralityChildren = function(nodeId, callback) {
|
||||||
|
|
Loading…
Reference in New Issue