How Graph Interations Take Effect on Displayed Graph and Backing Database
+We define graph interactions as any mouse and +keyboard events on the +Graph frame view
+There are basically 3 components involved in handling users' interactions:
+-
+
-
+
GraphEventHandlerModel contains implementations on how to operate on the displayed graph for various interactions
+
+ -
+
Visualization triggers the implementations via D3 callbacks
+
+ -
+
VisualizationView is involved if a certain type of user interaction involves database changes
+
+
How to Implement a User Interaction
+-
+
-
+
Implement an event handler function in GraphEventHandlerModel
+
+ -
+
Bind the handler function in
+GraphEventHandlerModel.bindEventHandlers()
+ -
+
Trigger the handler function in
+Visualization
+ -
+
If the interaction involves database changes, add the corresponding logic to
+GraphInteractionCallBack
, and
+ -
+
trigger the
+GraphInteractionCallBack
in the handler function
+
For example, let’s say we’d like to support easy on-graph editing by allowing us to create a new node when we double +click on canvas. We will
+The complete implementation is in this PR as a reference
+Was this page helpful?
+ + + + +