Skip to content

Commit

Permalink
Double clicking can make a node on canvas, although not at clicking p…
Browse files Browse the repository at this point in the history
…osition
  • Loading branch information
QubitPi committed Oct 3, 2023
1 parent e41c7ad commit ae6cd35
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ export class GraphEventHandlerModel {
}

onCanvasDblClicked(): void {
console.log('You have double clicked the canvas!')
this.graph.addNodes([new NodeModel('New Node', [], {}, {})])
this.visualization.update({ updateNodes: true, updateRelationships: true })

// this will persist node to Neo4J DB...
this.onGraphInteraction(NODE_ON_CANVAS_CREATE)
}

Expand Down

0 comments on commit ae6cd35

Please sign in to comment.