Description
Hello,
I would like to be able to use the mouse wheel for other things than zooming inand out in the canvas.
I am aware of the API to set custom zoom levels through the config #174
I was thinking of switching between a range of pre-defined zoom levels and an ImVector that contains only 1 zoom level (the current zoom level). That way, even if the user uses the mouse scroll, the zoom level will not change.
something along the lines of:
ed::Config& config = ed::GetConfig(ed::GetCurrentEditor());
config.CustomZoomLevels.clear();
config.CustomZoomLevels.push_back(ed::GetCurrentZoom());
but the
ed::GetConfig(ed::GetCurrentEditor());
returns a const reference
So, it seems custom zoom levels can only be set before the context is created. Is this correct?
I was also thinking of accessing the NavigateAction and try to use either StopNavigation or FinishNavigation but I couldn't find a way to use GetCurrentAction since the global API gives access to ax::NodeEditor::EditorContext
and not the internal counter part ax::NodeEditor::Detail::EditorContext
.
So, I'll probably go meddle in the source code and try to add a few access methods to the global API.
But, maybe I missed something (obvious?). Could anyone be kind enough to point it out?
Thank you in advance!