Using NavigateAction::m_IsActive boolean (m_NavigateAction of the EditorContext)
Added methods To gloabal API to directly set it to true (ResumeNavigation) or false (SuspendNavigation).
As a result, we can call the couple Suspend/Resume to momentarily deactivate the canvas zoom.
Use Case Example
When hovering over a ListBox (this is a custom to my project), I can call ax::NodeEditor::SuspendNavigation() before a portion of code that wants to use the ImGui::GetIO().MouseWheel input. Then, I call ax::NodeEditor::ResumeNavigation().
Pseudo-code
if (isListBoxHovered())
{
ax::NodeEditor::SuspendNavigation();
//handle list box scrolling
ax::NodeEditor::ResumeNavigation();
}
Major:
Use Case Example
When hovering over a ListBox (this is a custom to my project), I can call
ax::NodeEditor::SuspendNavigation()
before a portion of code that wants to use theImGui::GetIO().MouseWheel
input. Then, I callax::NodeEditor::ResumeNavigation()
.Pseudo-code