mirror of
https://github.com/Siccity/xNodeGroups.git
synced 2025-12-20 01:06:02 +08:00
Connection point fix
If you use additional connection points in your graph you will see the NullRefExeption and your group will not be able to capture nodes inside, because of connection point(it's the same node with null type). This small fix add ability to capture graphs with connection points.
This commit is contained in:
parent
4f4585bd6a
commit
35c3f55b03
@ -19,6 +19,7 @@ namespace XNode.NodeGroups {
|
|||||||
List<Node> result = new List<Node>();
|
List<Node> result = new List<Node>();
|
||||||
foreach (Node node in graph.nodes) {
|
foreach (Node node in graph.nodes) {
|
||||||
if (node == this) continue;
|
if (node == this) continue;
|
||||||
|
if (node == null) continue;
|
||||||
if (node.position.x < this.position.x) continue;
|
if (node.position.x < this.position.x) continue;
|
||||||
if (node.position.y < this.position.y) continue;
|
if (node.position.y < this.position.y) continue;
|
||||||
if (node.position.x > this.position.x + width) continue;
|
if (node.position.x > this.position.x + width) continue;
|
||||||
@ -28,4 +29,4 @@ namespace XNode.NodeGroups {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user