Commit 0aca9192 authored by unknown's avatar unknown

Merge branch 'nicolas/feature' into maximilian/newGraph

parents 32926a0e 7f500ee1
......@@ -6,6 +6,7 @@
import IdSet from '../../misc/customTypes/IdSet'
import { Node2d, Link } from './components'
import { Relationship } from 'neo4j-driver/types/v1'
/**
......@@ -263,7 +264,10 @@ export class Graph2d {
return this._queryEngine.fetchComponents(params, this.addComponents(f))
})
getRelated = ids => f => {this.getChildren(ids)(f); this.getParents(ids)(f)}
getRelated = (ids, nodeType='all', relationType="all") => f => {
this.getChildren(ids, nodeType, relationType)(f)
this.getParents(ids, nodeType, relationType)(f)
}
collapseParents = (ids, nodeType="all", relationType="all", recursive=false) => this._nodes.collectFromKeys(ids)
.map(node => this._nodes.collectFromKeys(node.getParents(relationType).map(link => link.id))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment