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

Method SelectNode

Code/EngineTools/NodeGraph/NodeGraph_View.cpp:1204–1209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1202
1203 void GraphView::CenterView( BaseNode const* pNode )
1204 {
1205 EE_ASSERT( m_pGraph != nullptr );
1206 EE_ASSERT( pNode != nullptr && m_pGraph->FindNode( pNode->GetID() ) != nullptr );
1207
1208 ImVec2 const nodeHalfSize = ( pNode->GetSize() / 2 );
1209 ImVec2 const nodeCenter = ImVec2( pNode->GetPosition() ) + nodeHalfSize;
1210 *m_pViewOffset = nodeCenter - ( m_canvasSize / 2 );
1211 }
1212

Callers 2

NavigateToMethod · 0.80

Calls 3

GetViewedGraphFunction · 0.85
AddToSelectionFunction · 0.85
GetIDMethod · 0.45

Tested by

no test coverage detected