Skip to content

Commit

Permalink
changes to graph controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Doppelkeks committed Jan 9, 2025
1 parent d41b4e6 commit a84eb26
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.4.3] - 2024-03-27
### Added
- Added user specific flag and logic to auto expand all foldouts in the side inspector
- Added user specific flag and logic to auto expand all foldouts in the side inspector

## [0.4.4] - 2024-03-27
### Added
- Added event callback when nodes were pasted
2 changes: 2 additions & 0 deletions Editor/Controllers/GraphController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace NewGraph {

public class GraphController {

public event Action<List<NodeModel>> OnNodesPasted;
public event Action<IGraphModelData> OnGraphLoaded;
public event Action<IGraphModelData> OnBeforeGraphLoaded;

Expand Down Expand Up @@ -205,6 +206,7 @@ public void OnPaste(object data = null) {
// position node clones relative to the current mouse position & add them to the current graph
Vector2 viewPosition = graphView.GetMouseViewPosition();
PositionNodesRelative(viewPosition, nodes);
OnNodesPasted?.Invoke(nodes);
}, Reload);
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "com.gentlymad.newgraph",
"version": "0.4.3",
"version": "0.4.4",
"displayName": "NewGraph",
"description": "A general data oriented node graph solution. This is build upon the idea to visualize complex data structures as graph networks without having to modify already established data classes, except adding [Node], [Port] and [SerializeReference] attributes to call classes that should show in the Graph View.",
"unity": "2022.2",
"unity": "2022.3",
"documentationUrl": "https://github.com/Gentlymad-Studios/NewGraph/wiki",
"changelogUrl": "https://github.com/Gentlymad-Studios/NewGraph/blob/master/CHANGELOG.md",
"licensesUrl": "https://github.com/Gentlymad-Studios/NewGraph/blob/master/LICENSE.md",
Expand Down

0 comments on commit a84eb26

Please sign in to comment.