Skip to content

Commit

Permalink
node SetPosition will now edit the variable instead of the property
Browse files Browse the repository at this point in the history
  • Loading branch information
XxmArKxX94 committed Jan 24, 2025
1 parent 5537513 commit 721426c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed port connection policies so extended classes can also be used for port connections (thanks for the pr @emrys90)

## [0.4.6] - 2025-01-25
## [0.4.6] - 2025-01-23
### Changed
- Remove OnViewChangedCallback for better performance

## [0.4.7] - 2025-01-25
## [0.4.7] - 2025-01-23
### Changed
- Proper unregister Events

## [0.4.8] - 2025-01-25
## [0.4.8] - 2025-01-23
### Fixed
- removed unneeded ExecuteDefaultAction from graph view

## [0.4.9] - 2025-01-24
### Changed
- node SetPosition will now edit the variable instead of the property
12 changes: 2 additions & 10 deletions Models/NodeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,8 @@ public string SetName(string name) {
}

public void SetPosition(float positionX, float positionY) {
if (dataIsSet) {
if (positionX != nodeX || positionY != nodeY) {
nodeXProperty.floatValue = positionX;
nodeYProperty.floatValue = positionY;
nodeXProperty.serializedObject.ApplyModifiedProperties();
}
} else {
nodeX = positionX;
nodeY = positionY;
}
nodeX = positionX;
nodeY = positionY;
}

public SerializedProperty GetSerializedProperty() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.gentlymad.newgraph",
"version": "0.4.8",
"version": "0.4.9",
"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.3",
Expand Down

0 comments on commit 721426c

Please sign in to comment.