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

Method OnDragNode

Code/EngineTools/NodeGraph/NodeGraph_View.cpp:1796–1818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1794 }
1795
1796 // Add any child comments nodes as well
1797 for ( int32_t i = 0; i < m_dragState.m_draggedNodes.size(); i++ )
1798 {
1799 if ( auto pCommentNode = TryCast<CommentNode>( m_dragState.m_draggedNodes[i] ) )
1800 {
1801 ProcessCommentNode( pCommentNode );
1802 }
1803 }
1804
1805 GetViewedGraph()->BeginModification();
1806 }
1807
1808 void GraphView::OnDragNode( DrawContext const& ctx )
1809 {
1810 EE_ASSERT( !m_isReadOnly );
1811 EE_ASSERT( m_dragState.m_mode == DragMode::Node );
1812
1813 if ( !ImGui::IsMouseDown( ImGuiMouseButton_Left ) )
1814 {
1815 StopDraggingNode( ctx );
1816 return;
1817 }
1818
1819 //-------------------------------------------------------------------------
1820
1821 ImVec2 const mouseDragDelta = ImGui::GetMouseDragDelta( ImGuiMouseButton_Left );

Callers

nothing calls this directly

Calls 2

WindowToCanvasMethod · 0.80
SetPositionMethod · 0.80

Tested by

no test coverage detected