浏览代码

Fixed hiding of right pane when there are no outputs

Also removed some unnecessary classList checks
/main
Peter Bay Bastian 8 年前
当前提交
640ab79a
共有 1 个文件被更改,包括 17 次插入19 次删除
  1. 36
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/NodeDrawer.cs

36
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/NodeDrawer.cs


var anchors = nodeData.elements.OfType<AnchorDrawData>().ToList();
if (anchors.Count == 0)
{
m_RightContainer.AddToClassList("empty");
}
{
}
int outputCount = 0;
{
}
{
outputCount++;
}
if (outputCount == 0)
m_RightContainer.AddToClassList("empty");
else
m_RightContainer.RemoveFromClassList("empty");
if (controlDrawData.Count == 0)
{
if (!m_RightContainer.classList.Contains("empty"))
m_RightContainer.AddToClassList("empty");
return;
}
m_RightContainer.RemoveFromClassList("empty");
if (!nodeData.expanded)
{

}
if (!nodeData.expanded)
{
if (!classList.Contains("collapsed"))
AddToClassList("collapsed");
}
AddToClassList("collapsed");
{
if (classList.Contains("collapsed"))
RemoveFromClassList("collapsed");
}
RemoveFromClassList("collapsed");
AddHeader(nodeData);
AddSlots(nodeData);

正在加载...
取消
保存