diff --git a/Scripts/Editor/NodeEditorGUI.cs b/Scripts/Editor/NodeEditorGUI.cs index 3fc5f21..7198486 100644 --- a/Scripts/Editor/NodeEditorGUI.cs +++ b/Scripts/Editor/NodeEditorGUI.cs @@ -13,8 +13,6 @@ namespace XNodeEditor { private List culledNodes; /// 19 if docked, 22 if not private int topPadding { get { return isDocked() ? 19 : 22; } } - /// 0 if docked, 3 if not - private int leftPadding { get { return isDocked() ? 2 : 0; } } /// Executed after all other window GUI. Useful if Zoom is ruining your day. Automatically resets after being run. public event Action onLateGUI; @@ -31,7 +29,7 @@ namespace XNodeEditor { DrawNodes(); DrawSelectionBox(); DrawTooltip(); - DrawGraphOnGUI(); + graphEditor.OnGUI(); // Run and reset onLateGUI if (onLateGUI != null) { @@ -62,16 +60,6 @@ namespace XNodeEditor { GUI.matrix = Matrix4x4.TRS(offset, Quaternion.identity, Vector3.one); } - /// Ends the GUI Group temporarily to draw any additional elements in the NodeGraphEditor. - private void DrawGraphOnGUI() { - GUI.EndGroup(); - Rect rect = new Rect(new Vector2(leftPadding, topPadding), new Vector2(Screen.width, Screen.height)); - GUI.BeginGroup(rect); - graphEditor.OnGUI(); - GUI.EndGroup(); - GUI.BeginGroup(new Rect(0.0f, topPadding - (topPadding * zoom), Screen.width, Screen.height)); - } - public void DrawGrid(Rect rect, float zoom, Vector2 panOffset) { rect.position = Vector2.zero;