mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
fix edge case with 2 points outside the screen on either side of it, where the edge should show up
This commit is contained in:
parent
5219e8f65b
commit
ebe059fff3
@ -153,8 +153,9 @@ namespace XNodeEditor {
|
|||||||
var p1 = gridPoints[1];
|
var p1 = gridPoints[1];
|
||||||
|
|
||||||
var windowRect = new Rect(Vector2.zero, new Vector2(position.width, position.height));
|
var windowRect = new Rect(Vector2.zero, new Vector2(position.width, position.height));
|
||||||
|
var noddleRect = new Rect(p0.x, p0.y, Mathf.Abs(p0.x - p1.x), Mathf.Abs(p0.y - p1.y));
|
||||||
|
|
||||||
if (!windowRect.Contains(p0) && !windowRect.Contains(p1)) return;
|
if (!windowRect.Overlaps(noddleRect)) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Color originalHandlesColor = Handles.color;
|
Color originalHandlesColor = Handles.color;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user