public void Draw(Rect rect)
        {
            GUILayoutElements.DrawGrid(
                rect,
                20f,
                20f,
                0.5f,
                new Color(0.3f, 0.3f, 0.3f),
                selectedLayer != null ? selectedLayer.zoom : 1.0f
                );
            if (selectedLayer != null)
            {
                EditorZoomArea.Begin(selectedLayer.zoom, rect);

                DrawConnections();
                DrawStates();
                DrawTransitionToMousePos(mousePosition);

                if (multipleSelection)
                {
                    GUI.Box(selectionArea, "", GUIResources.GetSelectionArea());
                }

                EditorZoomArea.End();
            }
        }