forked from neo4j/neo4j-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
304 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
name: Release | ||
|
||
"on": | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
:description: How graph interations take effect on displayed graph and backing database | ||
|
||
|
||
[[user-interactions]] | ||
= How Graph Interations Take Effect on Displayed Graph and Backing Database | ||
|
||
We define *graph interactions* as any https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent[mouse] and | ||
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent[keyboard] events on the | ||
link:visual-tour.html#frame-views[_Graph_ frame view] | ||
|
||
There are basically 3 components involved in handling users' interactions: | ||
|
||
1. *GraphEventHandlerModel* contains implementations on how to operate on the displayed graph for various interactions | ||
2. *Visualization* triggers the implementations via D3 callbacks | ||
3. *VisualizationView* is involved if a certain type of user interaction involves database changes | ||
|
||
== How to Implement a User Interaction | ||
|
||
1. Implement an event handler function in GraphEventHandlerModel | ||
2. Bind the handler function in `GraphEventHandlerModel.bindEventHandlers()` | ||
3. Trigger the handler function in `Visualization` | ||
4. If the interaction involves database changes, add the corresponding logic to `GraphInteractionCallBack`, and | ||
5. 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 https://github.com/QubitPi/neo4j-browser/pull/7[this PR] as a reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters