Skip to content

Commit

Permalink
feat: Expand nodes in the BC Juggl view graph
Browse files Browse the repository at this point in the history
  • Loading branch information
HEmile committed Jan 22, 2022
1 parent 37ccf4f commit d6b4fe3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Visualisations/Juggl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,16 @@ class BCStore extends Component implements ICoreDataStore {
return new BCStoreEvents();
}

getNeighbourhood(nodeId: VizId[]): Promise<cytoscape.NodeDefinition[]> {
async getNeighbourhood(nodeIds: VizId[], view: IJuggl): Promise<cytoscape.NodeDefinition[]> {
// TODO
return Promise.resolve([]);
const new_nodes = [];
for (const nodeId of nodeIds) {
const name = nodeId.id.slice(0, -3);
for (const new_node of this.graph.neighbors(name)) {
new_nodes.push(await this.get(new VizId(new_node + ".md", STORE_ID), view))
}
}
return new_nodes;
}

refreshNode(id: VizId, view: IJuggl): void | Promise<void> {
Expand Down

0 comments on commit d6b4fe3

Please sign in to comment.