浏览代码

Remove unused function in GraphEditrorView

/main
Jens Holm 7 年前
当前提交
d7635005
共有 1 个文件被更改,包括 0 次插入23 次删除
  1. 23
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs

23
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs


m_GraphInspectorView = new GraphInspectorView(assetName, previewManager, graph) { name = "inspector" };
m_GraphView.RegisterCallback<PostLayoutEvent>(OnPostLayout);
m_GraphView.RegisterCallback<KeyDownEvent>(OnSpaceDown);
m_GraphView.Add(m_GraphInspectorView);

AddEdge(edge);
Add(content);
}
void OnPostLayout(PostLayoutEvent evt)
{
const float minimumVisibility = 60f;
Rect inspectorViewRect = m_GraphInspectorView.layout;
float minimumXPosition = minimumVisibility - inspectorViewRect.width;
float maximumXPosition = m_GraphView.layout.width - minimumVisibility;
float minimumYPosition = minimumVisibility - inspectorViewRect.height;
float maximumYPosition = m_GraphView.layout.height - minimumVisibility;
inspectorViewRect.x = Mathf.Clamp(inspectorViewRect.x, minimumXPosition, maximumXPosition);
inspectorViewRect.y = Mathf.Clamp(inspectorViewRect.y, minimumYPosition, maximumYPosition);
inspectorViewRect.width = Mathf.Min(inspectorViewRect.width, layout.width);
inspectorViewRect.height = Mathf.Min(inspectorViewRect.height, layout.height);
m_GraphInspectorView.layout = inspectorViewRect;
}
void OnSpaceDown(KeyDownEvent evt)

正在加载...
取消
保存