MCPcopy Create free account
hub / github.com/BobbyAnguelov/Esoterica / CenterView

Method CenterView

Code/EngineTools/NodeGraph/NodeGraph_View.cpp:1181–1189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1179
1180 auto pMostSignificantNode = m_pGraph->GetMostSignificantNode();
1181 if ( pMostSignificantNode != nullptr )
1182 {
1183 CenterView( pMostSignificantNode );
1184 }
1185 else
1186 {
1187 int32_t const numNodes = (int32_t) m_pGraph->m_nodes.size();
1188 ImRect totalRect = ImRect( m_pGraph->m_nodes[0]->GetPosition(), ImVec2( m_pGraph->m_nodes[0]->GetPosition() ) + m_pGraph->m_nodes[0]->GetSize() );
1189 for ( int32_t i = 1; i < numNodes; i++ )
1190 {
1191 TTypeInstance<BaseNode>& nodeInstance = m_pGraph->m_nodes[i];
1192 if ( nodeInstance->IsVisible() )

Callers 1

NavigateToMethod · 0.80

Calls 3

ImVec2Function · 0.85
GetSizeMethod · 0.80
GetIDMethod · 0.45

Tested by

no test coverage detected